1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __fpa__Filters__RegionGrow__h__
6 #define __fpa__Filters__RegionGrow__h__
8 #include <itkFunctionBase.h>
9 #include <fpa/Config.h>
10 #include <fpa/Filters/QueueAlgorithm.h>
11 #include <fpa/Functors/VertexFunction.h>
19 template< class _TDataInterface >
21 : public fpa::Filters::QueueAlgorithm< _TDataInterface >
24 typedef _TDataInterface TDataInterface;
25 typedef fpa::Filters::QueueAlgorithm< TDataInterface > Superclass;
26 typedef RegionGrow Self;
27 typedef itk::SmartPointer< Self > Pointer;
28 typedef itk::SmartPointer< const Self > ConstPointer;
30 typedef typename TDataInterface::TTraits TTraits;
31 fpaTraitsMacro( typename TTraits );
33 typedef itk::FunctionBase< TInputValue, bool > TScalarPredicate;
34 typedef fpa::Functors::VertexFunction< TVertex, bool > TVertexPredicate;
37 itkTypeMacro( fpa::Filters::RegionGrow, fpa::Filters::QueueAlgorithm );
39 itkGetConstObjectMacro( ScalarPredicate, TScalarPredicate );
40 itkGetObjectMacro( ScalarPredicate, TScalarPredicate );
42 itkGetConstObjectMacro( VertexPredicate, TVertexPredicate );
43 itkGetObjectMacro( VertexPredicate, TVertexPredicate );
45 itkGetConstMacro( InsideValue, TOutputValue );
46 itkSetMacro( InsideValue, TOutputValue );
49 void SetPredicate( TScalarPredicate* p );
50 void SetPredicate( TVertexPredicate* p );
52 TOutputValue GetOutsideValue( ) const;
53 void SetOutsideValue( const TOutputValue& v );
57 virtual ~RegionGrow( );
59 virtual void _PostComputeOutputValue( TNode& n ) override;
60 virtual void _PreComputeOutputValue( TNode& n ) override;
63 RegionGrow( const Self& other );
64 Self& operator=( const Self& other );
67 typename TScalarPredicate::Pointer m_ScalarPredicate;
68 typename TVertexPredicate::Pointer m_VertexPredicate;
70 TOutputValue m_InsideValue;
77 #ifndef ITK_MANUAL_INSTANTIATION
78 # include <fpa/Filters/RegionGrow.hxx>
79 #endif // ITK_MANUAL_INSTANTIATION
80 #endif // __fpa__Filters__RegionGrow__h__