1 #ifndef __fpa__Image__MoriRegionGrowHelper__h__
2 #define __fpa__Image__MoriRegionGrowHelper__h__
6 #include <fpa/Image/RegionGrow.h>
7 #include <fpa/Image/Functors/RegionGrow/BinaryThreshold.h>
15 template< class _TInputImage, class _TOutputImage >
16 class MoriRegionGrowHelper
17 : public fpa::Image::RegionGrow< _TInputImage, _TOutputImage >
20 typedef MoriRegionGrowHelper Self;
21 typedef fpa::Image::RegionGrow< _TInputImage, _TOutputImage > Superclass;
22 typedef itk::SmartPointer< Self > Pointer;
23 typedef itk::SmartPointer< const Self > ConstPointer;
25 typedef typename Superclass::TOutput TOutput;
26 typedef typename Superclass::TVertex TVertex;
27 typedef typename Superclass::TGrowFunction TGrowFunction;
29 fpa::Image::Functors::RegionGrow::BinaryThreshold< _TInputImage >
30 TBinThresholdFunction;
31 typedef typename _TInputImage::PixelType TPixel;
34 typedef typename Superclass::_TQueueNode _TQueueNode;
35 typedef typename Superclass::_TQueue _TQueue;
37 typedef std::pair< TPixel, unsigned long > TCurveData;
38 typedef std::vector< TCurveData > TCurve;
42 itkTypeMacro( fpa::Image::MoriRegionGrowHelper, fpa::Image::RegionGrow );
44 itkGetConstMacro( Lower, TPixel );
45 itkGetConstMacro( Upper, TPixel );
46 itkGetConstMacro( Step, TPixel );
47 itkGetConstMacro( OptimumThreshold, typename _TOutputImage::PixelType );
49 itkSetMacro( Lower, TPixel );
50 itkSetMacro( Upper, TPixel );
51 itkSetMacro( Step, TPixel );
55 MoriRegionGrowHelper( );
56 virtual ~MoriRegionGrowHelper( );
58 virtual bool _ContinueGenerateData( ) override;
59 virtual void _BeforeGenerateData( ) override;
60 virtual void _AfterGenerateData( ) override;
61 virtual void _BeforeLoop( ) override;
62 virtual void _AfterLoop( ) override;
63 virtual bool _UpdateValue( _TQueueNode& v, const _TQueueNode& p ) override;
64 virtual void _UpdateResult( const _TQueueNode& n ) override;
67 // Purposely not defined
68 MoriRegionGrowHelper( const Self& other );
69 Self& operator=( const Self& other );
75 typename _TOutputImage::PixelType m_OptimumThreshold;
78 unsigned long m_ActualCount;
86 #ifndef ITK_MANUAL_INSTANTIATION
87 # include <fpa/Image/MoriRegionGrowHelper.hxx>
88 #endif // ITK_MANUAL_INSTANTIATION
90 #endif // __fpa__Image__MoriRegionGrowHelper__h__