1 #ifndef __fpa__Image__MoriFilterHelper__h__
2 #define __fpa__Image__MoriFilterHelper__h__
6 #include <fpa/Image/RegionGrow.h>
7 #include <fpa/Image/Functors/RegionGrow/BinaryThreshold.h>
15 template< class _TInputImage, class _TOutputImage >
16 class MoriFilterHelper
17 : public fpa::Image::RegionGrow< _TInputImage, _TOutputImage >
20 typedef MoriFilterHelper 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;
28 typedef typename _TInputImage::PixelType TPixel;
29 typedef fpa::Image::Functors::RegionGrow::BinaryThreshold< _TInputImage, TOutput > TBinThresholdFunction;
32 typedef typename Superclass::_TQueueNode _TQueueNode;
33 typedef typename Superclass::_TQueue _TQueue;
35 typedef std::pair< TPixel, unsigned long > TCurveData;
36 typedef std::vector< TCurveData > TCurve;
40 itkTypeMacro( fpa::Image::MoriFilterHelper, fpa::Image::RegionGrow );
42 itkGetConstMacro( Lower, TPixel );
43 itkGetConstMacro( Upper, TPixel );
44 itkGetConstMacro( Step, TPixel );
45 itkGetConstMacro( OptimumThreshold, typename _TOutputImage::PixelType );
47 itkSetMacro( Lower, TPixel );
48 itkSetMacro( Upper, TPixel );
49 itkSetMacro( Step, TPixel );
54 virtual ~MoriFilterHelper( );
56 virtual bool _ContinueGenerateData( ) override;
57 virtual void _BeforeGenerateData( ) override;
58 virtual void _AfterGenerateData( ) override;
59 virtual void _BeforeLoop( ) override;
60 virtual void _AfterLoop( ) override;
61 virtual bool _UpdateValue( _TQueueNode& v, const _TQueueNode& p ) override;
62 virtual void _UpdateResult( const _TQueueNode& n ) override;
65 // Purposely not defined
66 MoriFilterHelper( const Self& other );
67 Self& operator=( const Self& other );
73 typename _TOutputImage::PixelType m_OptimumThreshold;
76 unsigned long m_ActualCount;
84 #ifndef ITK_MANUAL_INSTANTIATION
85 # include <fpa/Image/MoriFilterHelper.hxx>
86 #endif // ITK_MANUAL_INSTANTIATION
88 #endif // __fpa__Image__MoriFilterHelper__h__