1 #ifndef __fpa__Image__Algorithm__h__
2 #define __fpa__Image__Algorithm__h__
4 #include <itkFunctionBase.h>
5 #include <itkImageToImageFilter.h>
6 #include <fpa/Base/Algorithm.h>
7 #include <fpa/Image/Functors/Base.h>
15 template< class _TInputImage, class _TOutputImage >
17 : public fpa::Base::Algorithm< itk::ImageToImageFilter< _TInputImage, _TOutputImage >, typename _TInputImage::IndexType, typename _TOutputImage::PixelType >
20 typedef itk::ImageToImageFilter< _TInputImage, _TOutputImage > TFilter;
21 typedef typename _TInputImage::IndexType TVertex;
22 typedef typename _TOutputImage::PixelType TOutput;
24 typedef Algorithm Self;
25 typedef fpa::Base::Algorithm< TFilter, TVertex, TOutput > Superclass;
26 typedef itk::SmartPointer< Self > Pointer;
27 typedef itk::SmartPointer< const Self > ConstPointer;
29 typedef typename Superclass::TFrontId TFrontId;
30 typedef typename Superclass::TNeighborhood TNeighborhood;
31 typedef fpa::Image::Functors::Base< itk::ImageBase< _TInputImage::ImageDimension >, itk::FunctionBase< TVertex, TNeighborhood > > TNeighborhoodFunction;
34 typedef typename Superclass::_TQueueNode _TQueueNode;
37 itkTypeMacro( fpa::Image::Algorithm, fpa::Base::Algorithm );
41 virtual ~Algorithm( );
43 virtual void _BeforeGenerateData( ) fpa_OVERRIDE;
44 virtual void _InitMarks( ) fpa_OVERRIDE;
45 virtual void _InitResults( const TOutput& init_value ) fpa_OVERRIDE;
46 virtual bool _IsMarked( const TVertex& v ) const fpa_OVERRIDE;
47 virtual void _Mark( const _TQueueNode& n ) fpa_OVERRIDE;
48 virtual TFrontId _GetMark( const TVertex& v ) const fpa_OVERRIDE;
49 virtual void _UpdateResult( const _TQueueNode& n ) fpa_OVERRIDE;
52 // Purposely not defined
53 Algorithm( const Self& other );
54 Self& operator=( const Self& other );
57 unsigned int m_MarksIdx;
64 #ifndef ITK_MANUAL_INSTANTIATION
65 # include <fpa/Image/Algorithm.hxx>
66 #endif // ITK_MANUAL_INSTANTIATION
68 #endif // __fpa__Image__Algorithm__h__