// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __fpa__Filters__RegionGrow__h__ #define __fpa__Filters__RegionGrow__h__ #include #include #include #include namespace fpa { namespace Filters { /** */ template< class _TDataInterface > class RegionGrow : public fpa::Filters::QueueAlgorithm< _TDataInterface > { public: typedef _TDataInterface TDataInterface; typedef fpa::Filters::QueueAlgorithm< TDataInterface > Superclass; typedef RegionGrow Self; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef typename TDataInterface::TTraits TTraits; fpaTraitsMacro( typename TTraits ); typedef itk::FunctionBase< TInputValue, bool > TScalarPredicate; typedef fpa::Functors::VertexFunction< TVertex, bool > TVertexPredicate; public: itkTypeMacro( fpa::Filters::RegionGrow, fpa::Filters::QueueAlgorithm ); itkGetConstObjectMacro( ScalarPredicate, TScalarPredicate ); itkGetObjectMacro( ScalarPredicate, TScalarPredicate ); itkGetConstObjectMacro( VertexPredicate, TVertexPredicate ); itkGetObjectMacro( VertexPredicate, TVertexPredicate ); itkGetConstMacro( InsideValue, TOutputValue ); itkSetMacro( InsideValue, TOutputValue ); public: void SetPredicate( TScalarPredicate* p ); void SetPredicate( TVertexPredicate* p ); TOutputValue GetOutsideValue( ) const; void SetOutsideValue( const TOutputValue& v ); protected: RegionGrow( ); virtual ~RegionGrow( ); virtual void _PostComputeOutputValue( TNode& n ) override; virtual void _PreComputeOutputValue( TNode& n ) override; private: RegionGrow( const Self& other ); Self& operator=( const Self& other ); protected: typename TScalarPredicate::Pointer m_ScalarPredicate; typename TVertexPredicate::Pointer m_VertexPredicate; TOutputValue m_InsideValue; }; } // ecapseman } // ecapseman #ifndef ITK_MANUAL_INSTANTIATION # include #endif // ITK_MANUAL_INSTANTIATION #endif // __fpa__Filters__RegionGrow__h__ // eof - $RCSfile$