1 #ifndef __FPA__IMAGE__REGIONGROW__H__
2 #define __FPA__IMAGE__REGIONGROW__H__
4 #include <itkImageToImageFilter.h>
6 #include <fpa/Base/RegionGrow.h>
7 #include <fpa/Image/Algorithm.h>
8 #include <fpa/Image/Functors/ImageFunction.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;
35 fpa::Image::Functors::ImageFunction< I, bool >
40 itkTypeMacro( RegionGrow, fpaBaseRegionGrow );
42 itkGetObjectMacro( MembershipFunction, TMembershipFunction );
43 itkSetObjectMacro( MembershipFunction, TMembershipFunction );
48 m_MembershipFunction( NULL )
50 virtual ~RegionGrow( )
53 virtual bool _CheckMembership(
54 const typename Superclass::_TNode& n
57 if( this->m_MembershipFunction.IsNotNull( ) )
60 this->m_MembershipFunction->GetInputImage( ) !=
63 this->m_MembershipFunction->SetInputImage( this->GetInput( ) );
64 return( this->m_MembershipFunction->Evaluate( n.Vertex ) );
71 // Purposely not implemented
72 RegionGrow( const Self& );
73 void operator=( const Self& );
76 typename TMembershipFunction::Pointer m_MembershipFunction;
83 #endif // __FPA__IMAGE__REGIONGROW__H__