1 #ifndef __cpExtensions__Algorithms__CPRImageFilter__h__
2 #define __cpExtensions__Algorithms__CPRImageFilter__h__
5 #include <itkImageToImageFilter.h>
6 #include <itkJoinSeriesImageFilter.h>
7 #include <cpExtensions/Algorithms/IsoImageSlicer.h>
15 template< class _TImage, class _TCurve >
17 : public itk::ImageToImageFilter< _TImage, _TImage >
20 typedef CPRImageFilter Self;
21 typedef itk::ImageToImageFilter< _TImage, _TImage > Superclass;
22 typedef itk::SmartPointer< Self > Pointer;
23 typedef itk::SmartPointer< const Self > ConstPointer;
25 typedef _TImage TImage;
26 typedef _TCurve TCurve;
27 typedef typename TCurve::TScalar TScalar;
29 typedef IsoImageSlicer< TImage, TScalar > TSlicer;
30 typedef typename TSlicer::TInterpolateFunction TInterpolateFunction;
31 typedef typename TSlicer::TSliceImage TSliceImage;
33 typedef itk::JoinSeriesImageFilter< TSliceImage, TImage > TJoinFilter;
37 itkTypeMacro( CPRImageFilter, itk::ImageToImageFilter );
39 itkGetConstMacro( SliceRadius, double );
40 itkGetObjectMacro( Interpolator, TInterpolateFunction );
42 itkSetMacro( SliceRadius, double );
43 itkSetObjectMacro( Interpolator, TInterpolateFunction );
47 const _TCurve* GetCurve( ) const;
48 void SetCurve( _TCurve* curve );
52 virtual ~CPRImageFilter( );
54 virtual void GenerateOutputInformation( ) cpExtensions_OVERRIDE;
55 virtual void GenerateInputRequestedRegion( ) cpExtensions_OVERRIDE;
56 virtual void GenerateData( ) cpExtensions_OVERRIDE;
60 typename TInterpolateFunction::Pointer m_Interpolator;
62 std::vector< typename TSlicer::Pointer > m_Slicers;
63 typename TJoinFilter::Pointer m_Join;
70 #ifndef ITK_MANUAL_INSTANTIATION
71 # include <cpExtensions/Algorithms/CPRImageFilter.hxx>
72 #endif // ITK_MANUAL_INSTANTIATION
74 #endif // __cpExtensions__Algorithms__CPRImageFilter__h__