1 #ifndef __fpa__Image__MoriRegionGrow__h__
2 #define __fpa__Image__MoriRegionGrow__h__
4 #include <itkImageToImageFilter.h>
5 #include <itkBinaryThresholdImageFilter.h>
6 #include <fpa/Image/MoriRegionGrowHelper.h>
14 template< class _TInputImage, class _TOutputImage, class _TAuxPixel = unsigned short >
16 : public itk::ImageToImageFilter< _TInputImage, _TOutputImage >
19 typedef MoriRegionGrow Self;
20 typedef itk::ImageToImageFilter< _TInputImage, _TOutputImage > Superclass;
21 typedef itk::SmartPointer< Self > Pointer;
22 typedef itk::SmartPointer< const Self > ConstPointer;
24 typedef itk::Image< _TAuxPixel, _TInputImage::ImageDimension > TAuxImage;
25 typedef fpa::Image::MoriRegionGrowHelper< _TInputImage, TAuxImage > THelper;
26 typedef itk::BinaryThresholdImageFilter< TAuxImage, _TOutputImage > TThreshold;
28 typedef typename _TInputImage::IndexType TIndex;
29 typedef typename _TInputImage::PixelType TInputPixel;
30 typedef typename _TOutputImage::PixelType TOutputPixel;
34 itkTypeMacro( fpa::Image::MoriRegionGrow, itk::ImageToImageFilter );
36 itkGetConstMacro( Seed, TIndex );
37 itkSetMacro( Seed, TIndex );
40 TAuxImage* GetAuxiliaryImage( );
41 const TAuxImage* GetAuxiliaryImage( ) const;
43 TInputPixel GetLower( ) const;
44 TInputPixel GetUpper( ) const;
45 TInputPixel GetStep( ) const;
46 TOutputPixel GetInsideValue( ) const;
47 TOutputPixel GetOutsideValue( ) const;
49 void SetLower( const TInputPixel& v );
50 void SetUpper( const TInputPixel& v );
51 void SetStep( const TInputPixel& v );
52 void SetInsideValue( const TOutputPixel& v );
53 void SetOutsideValue( const TOutputPixel& v );
57 itkGetConstMacro( Lower, TPixel );
58 itkGetConstMacro( Upper, TPixel );
59 itkGetConstMacro( Step, TPixel );
60 itkGetConstMacro( Sensitivity, double );
61 itkSetMacro( Lower, TPixel );
62 itkSetMacro( Upper, TPixel );
63 itkSetMacro( Step, TPixel );
64 itkSetMacro( Sensitivity, double );
69 virtual ~MoriRegionGrow( );
71 virtual void GenerateData( ) override;
74 // Purposely not defined
75 MoriRegionGrow( const Self& other );
76 Self& operator=( const Self& other );
79 typename THelper::Pointer m_Helper;
80 typename TThreshold::Pointer m_Threshold;
88 #ifndef ITK_MANUAL_INSTANTIATION
89 # include <fpa/Image/MoriRegionGrow.hxx>
90 #endif // ITK_MANUAL_INSTANTIATION
92 #endif // __fpa__Image__MoriRegionGrow__h__