1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Base__RegionGrow__h__
7 #define __fpa__Base__RegionGrow__h__
11 #include <itkConceptChecking.h>
12 #include <itkFunctionBase.h>
20 template< class _TAlgorithm >
25 typedef RegionGrow Self;
26 typedef _TAlgorithm Superclass;
27 typedef itk::SmartPointer< Self > Pointer;
28 typedef itk::SmartPointer< const Self > ConstPointer;
30 typedef typename _TAlgorithm::TNode TNode;
31 typedef typename _TAlgorithm::TNodes TNodes;
32 typedef typename _TAlgorithm::TInputValue TInputValue;
33 typedef typename _TAlgorithm::TOutputValue TOutputValue;
34 typedef typename _TAlgorithm::TFrontId TFrontId;
35 typedef typename _TAlgorithm::TVertex TVertex;
37 typedef std::deque< TNode > TQueue;
38 typedef itk::FunctionBase< TInputValue, bool > TValuePredicate;
39 typedef itk::FunctionBase< TVertex, bool > TVertexPredicate;
44 ( itk::Concept::IsUnsignedInteger< TOutputValue > )
48 itkGetObjectMacro( ValuePredicate, TValuePredicate );
49 itkGetObjectMacro( VertexPredicate, TVertexPredicate );
50 itkGetConstMacro( InsideValue, TOutputValue );
52 itkSetMacro( InsideValue, TOutputValue );
55 virtual itk::ModifiedTimeType GetMTime( ) const override;
56 virtual TOutputValue GetOutsideValue( ) const;
57 virtual void SetOutsideValue( const TOutputValue& v );
59 void SetPredicate( TValuePredicate* p );
60 void SetPredicate( TVertexPredicate* p );
64 virtual ~RegionGrow( );
66 virtual void _ComputeOutputValue( TNode& n ) override;
67 virtual void _UpdateOutputValue( TNode& n ) override;
68 virtual void _QueueClear( ) override;
69 virtual TNode _QueuePop( ) override;
70 virtual void _QueuePush( const TNode& node ) override;
71 virtual unsigned long _QueueSize( ) const override;
72 virtual void _PrepareSeeds( TNodes& nodes ) override;
75 // Purposely not implemented.
76 RegionGrow( const Self& other );
77 Self& operator=( const Self& other );
80 typename TValuePredicate::Pointer m_ValuePredicate;
81 typename TVertexPredicate::Pointer m_VertexPredicate;
83 TOutputValue m_InsideValue;
92 #ifndef ITK_MANUAL_INSTANTIATION
93 # include <fpa/Base/RegionGrow.hxx>
94 #endif // ITK_MANUAL_INSTANTIATION
96 #endif // __fpa__Base__RegionGrow__h__