1 #ifndef __FPA__IMAGE__REGIONGROW__H__
2 #define __FPA__IMAGE__REGIONGROW__H__
4 #include <itkImageFunction.h>
5 #include <itkImageToImageFilter.h>
7 #include <fpa/Base/RegionGrow.h>
8 #include <fpa/Image/Algorithm.h>
15 * @param I Input image type
19 : public Algorithm< I, fpa::Base::RegionGrow< typename I::IndexType, typename I::PixelType, typename I::PixelType, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, itk::ImageToImageFilter< I, I > > >
22 // Standard class typdedefs
23 typedef typename I::IndexType TVertex;
24 typedef typename I::PixelType TResult;
25 typedef typename I::PixelType TVertexValue;
26 typedef itk::ImageToImageFilter< I, I > TBaseFilter;
27 typedef fpa::Base::RegionGrow< TVertex, TResult, TVertexValue, itk::Functor::IndexLexicographicCompare< I::ImageDimension >, TBaseFilter > TBaseAlgorithm;
29 typedef RegionGrow Self;
30 typedef Algorithm< I, TBaseAlgorithm > Superclass;
31 typedef itk::SmartPointer< Self > Pointer;
32 typedef itk::SmartPointer< const Self > ConstPointer;
34 typedef itk::ImageFunction< I, bool > TMembershipFunction;
38 itkTypeMacro( RegionGrow, fpaBaseRegionGrow );
40 itkGetObjectMacro( MembershipFunction, TMembershipFunction );
41 itkSetObjectMacro( MembershipFunction, TMembershipFunction );
46 m_MembershipFunction( NULL )
48 virtual ~RegionGrow( )
51 virtual bool _CheckMembership(
52 const typename Superclass::_TNode& n
55 if( this->m_MembershipFunction.IsNotNull( ) )
58 this->m_MembershipFunction->GetInputImage( ) !=
61 this->m_MembershipFunction->SetInputImage( this->GetInput( ) );
62 return( this->m_MembershipFunction->EvaluateAtIndex( n.Vertex ) );
69 // Purposely not implemented
70 RegionGrow( const Self& );
71 void operator=( const Self& );
74 typename TMembershipFunction::Pointer m_MembershipFunction;
81 #endif // __FPA__IMAGE__REGIONGROW__H__