1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Filters__Image__Algorithm__h__
6 #define __fpa__Filters__Image__Algorithm__h__
18 template< class _TBaseAlgorithm >
20 : public _TBaseAlgorithm
23 typedef _TBaseAlgorithm TBaseAlgorithm;
24 typedef typename TBaseAlgorithm::TTraits TTraits;
25 fpaTraitsMacro( typename, TTraits );
27 typedef TBaseAlgorithm Superclass;
28 typedef Algorithm Self;
29 typedef itk::SmartPointer< Self > Pointer;
30 typedef itk::SmartPointer< const Self > ConstPointer;
32 typedef typename TTraits::TInputImage TInputImage;
33 typedef typename TTraits::TOutputImage TOutputImage;
34 typedef itk::Image< TMark, Self::Dimension > TMarksImage;
37 itkTypeMacro( fpa::Filters::Image::Algorithm, TBaseAlgorithm );
39 itkGetConstMacro( NeighborhoodOrder, unsigned int );
40 itkSetMacro( NeighborhoodOrder, unsigned int );
42 fpaFilterOutputMacro( Marks, TMarksImage );
46 virtual ~Algorithm( );
48 virtual void _ConfigureOutputs( ) override;
49 virtual TInputValue _GetInputValue( const TVertex& v ) const override;
50 virtual TOutputValue _GetOutputValue( const TVertex& v ) const override;
51 virtual TNeighborhood _GetNeighbors( const TVertex& v ) const override;
52 virtual void _UpdateOutputValue( TNode& n ) override;
53 virtual unsigned long _GetMark( const TVertex& v ) const override;
54 virtual bool _IsMarked( const TVertex& v ) const override;
55 virtual void _Mark( const TVertex& v, unsigned long m ) override;
58 // Purposely not implemented.
59 Algorithm( const Self& other );
60 Self& operator=( const Self& other );
63 unsigned int m_MarksIdx;
64 unsigned int m_NeighborhoodOrder;
73 #ifndef ITK_MANUAL_INSTANTIATION
74 # include <fpa/Filters/Image/Algorithm.hxx>
75 #endif // ITK_MANUAL_INSTANTIATION
76 #endif // __fpa__Filters__Image__Algorithm__h__