+++ /dev/null
-// -------------------------------------------------------------------------
-// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
-// -------------------------------------------------------------------------
-
-#ifndef __cpExtensions__Algorithms__ImageFunctorFilter__h__
-#define __cpExtensions__Algorithms__ImageFunctorFilter__h__
-
-#include <itkFunctionBase.h>
-#include <itkImageToImageFilter.h>
-
-namespace cpExtensions
-{
- namespace Algorithms
- {
- /**
- */
- template< class _TInputImage, class _TOutputImage >
- class ImageFunctorFilter
- : public itk::ImageToImageFilter< I, O >
- {
- public:
- typedef ImageFunctorFilter Self;
- typedef itk::ImageToImageFilter< I, O > Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- typedef _TInputImage TInputImage;
- typedef _TOutputImage TOutputImage;
- typedef typename TInputImage::PixelType TInputPixel;
- typedef typename TOutputImage::PixelType TOutputPixel;
- typedef typename TOutputImage::RegionType TRegion;
-
- typedef itk::FunctionBase< TInputPixel, TOutputPixel > TFunctor;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( ImageFunctorFilter, itkImageToImageFilter );
-
- itkGetObjectMacro( Functor, TFunctor );
- itkGetConstObjectMacro( Functor, TFunctor );
- itkSetObjectMacro( Functor, TFunctor );
-
- protected:
- ImageFunctorFilter( );
- virtual ~ImageFunctorFilter( );
-
- virtual void ThreadedGenerateData( const TRegion& region, itk::ThreadIdType threadId ) override;
-
- private:
- // Purposely not implemented.
- ImageFunctorFilter( const Self& );
- void operator=( const Self& );
-
- protected:
- typename TFunctor::Pointer m_Functor;
- };
-
- } // ecapseman
-
-} // ecapseman
-
-#ifndef ITK_MANUAL_INSTANTIATION
-# include <cpExtensions/Algorithms/ImageFunctorFilter.hxx>
-#endif // ITK_MANUAL_INSTANTIATION
-
-#endif // __cpExtensions__Algorithms__ImageFunctorFilter__h__
-
-// eof - $RCSfile$