]> Creatis software - FrontAlgorithms.git/blob - appli/CTBronchi/MoriLabelling.h
...
[FrontAlgorithms.git] / appli / CTBronchi / MoriLabelling.h
1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5
6 #ifndef __CTBronchi__MoriLabelling__h__
7 #define __CTBronchi__MoriLabelling__h__
8
9 #include <itkImageToImageFilter.h>
10
11 namespace CTBronchi
12 {
13   /**
14    */
15   template< class _TInputImage, class _TLabelImage >
16   class MoriLabelling
17     : public itk::ImageToImageFilter< _TLabelImage, _TLabelImage >
18   {
19   public:
20     typedef MoriLabelling                                         Self;
21     typedef itk::ImageToImageFilter< _TLabelImage, _TLabelImage > Superclass;
22     typedef itk::SmartPointer< Self >                             Pointer;
23     typedef itk::SmartPointer< const Self >                       ConstPointer;
24
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;
30
31   public:
32     itkNewMacro( Self );
33     itkTypeMacro( MoriLabelling, itk::ImageToImageFilter );
34
35     itkGetConstMacro( UpperThreshold, TPixel );
36     itkSetMacro( UpperThreshold, TPixel );
37
38     itkGetConstMacro( InsideValue, TLabel );
39     itkSetMacro( InsideValue, TLabel );
40
41     itkGetConstMacro( InsideLabel, TLabel );
42     itkSetMacro( InsideLabel, TLabel );
43
44     itkGetConstMacro( OutsideLabel, TLabel );
45     itkSetMacro( OutsideLabel, TLabel );
46
47   public:
48     const TLabelImage* GetInputLabelImage( ) const;
49     void SetInputLabelImage( TLabelImage* image );
50
51     const TInputImage* GetInputRawImage( ) const;
52     void SetInputRawImage( TInputImage* image );
53
54   protected:
55     MoriLabelling( );
56     virtual ~MoriLabelling( );
57
58     virtual void ThreadedGenerateData( const TRegion& region, itk::ThreadIdType threadId ) override;
59
60   private:
61     // Purposely not implemented.
62     MoriLabelling( const Self& other );
63     Self& operator=( const Self& other );
64
65   protected:
66     TPixel m_UpperThreshold;
67     TLabel m_InsideValue;
68     TLabel m_InsideLabel;
69     TLabel m_OutsideLabel;
70   };
71
72 } // ecapseman
73
74 #ifndef ITK_MANUAL_INSTANTIATION
75 #  include <CTBronchi/MoriLabelling.hxx>
76 #endif // ITK_MANUAL_INSTANTIATION
77
78 #endif // __CTBronchi__MoriLabelling__h__
79
80 // eof - $RCSfile$