// ------------------------------------------------------------------------- // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) // ------------------------------------------------------------------------- #ifndef __CPEXTENSIONS__ALGORITHMS__IMAGEFUNCTIONFILTER__H__ #define __CPEXTENSIONS__ALGORITHMS__IMAGEFUNCTIONFILTER__H__ #include #include namespace cpExtensions { namespace Algorithms { /** */ template< class _TInput, class _TOutput, class _TFunction > class ImageFunctionFilter : public itk::ImageToImageFilter< _TInput, _TOutput > { public: typedef ImageFunctionFilter Self; typedef itk::ImageToImageFilter< _TInput, _TOutput > Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef _TInput TInput; typedef _TOutput TOutput; typedef _TFunction TFunction; typedef typename TOutput::RegionType TRegion; public: itkNewMacro( Self ); itkTypeMacro( ImageFunctionFilter, itkImageToImageFilter ); itkGetObjectMacro( Function, TFunction ); itkSetObjectMacro( Function, TFunction ); protected: ImageFunctionFilter( ); virtual ~ImageFunctionFilter( ); virtual void BeforeThreadedGenerateData( ) cpExtensions_OVERRIDE; virtual void ThreadedGenerateData( const TRegion& region, itk::ThreadIdType threadId ) cpExtensions_OVERRIDE; private: // Purposely not implemented. ImageFunctionFilter( const Self& ); void operator=( const Self& ); protected: typename TFunction::Pointer m_Function; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __CPEXTENSIONS__ALGORITHMS__IMAGEFUNCTIONFILTER__H__ // eof - $RCSfile$