1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __CTBronchi__MoriLabelling__h__
7 #define __CTBronchi__MoriLabelling__h__
9 #include <itkImageToImageFilter.h>
15 template< class _TInputImage, class _TLabelImage >
17 : public itk::ImageToImageFilter< _TLabelImage, _TLabelImage >
20 typedef MoriLabelling Self;
21 typedef itk::ImageToImageFilter< _TLabelImage, _TLabelImage > Superclass;
22 typedef itk::SmartPointer< Self > Pointer;
23 typedef itk::SmartPointer< const Self > ConstPointer;
25 typedef _TInputImage TInputImage;
26 typedef _TLabelImage TLabelImage;
27 typedef typename TInputImage::PixelType TPixel;
28 typedef typename TLabelImage::PixelType TLabel;
29 typedef typename TLabelImage::RegionType TRegion;
33 itkTypeMacro( MoriLabelling, itk::ImageToImageFilter );
35 itkGetConstMacro( UpperThreshold, TPixel );
36 itkSetMacro( UpperThreshold, TPixel );
38 itkGetConstMacro( InsideValue, TLabel );
39 itkSetMacro( InsideValue, TLabel );
41 itkGetConstMacro( InsideLabel, TLabel );
42 itkSetMacro( InsideLabel, TLabel );
44 itkGetConstMacro( OutsideLabel, TLabel );
45 itkSetMacro( OutsideLabel, TLabel );
48 const TLabelImage* GetInputLabelImage( ) const;
49 void SetInputLabelImage( TLabelImage* image );
51 const TInputImage* GetInputRawImage( ) const;
52 void SetInputRawImage( TInputImage* image );
56 virtual ~MoriLabelling( );
58 virtual void ThreadedGenerateData( const TRegion& region, itk::ThreadIdType threadId ) override;
61 // Purposely not implemented.
62 MoriLabelling( const Self& other );
63 Self& operator=( const Self& other );
66 TPixel m_UpperThreshold;
69 TLabel m_OutsideLabel;
74 #ifndef ITK_MANUAL_INSTANTIATION
75 # include <CTBronchi/MoriLabelling.hxx>
76 #endif // ITK_MANUAL_INSTANTIATION
78 #endif // __CTBronchi__MoriLabelling__h__