]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.h
...
[cpPlugins.git] / lib / cpExtensions / Algorithms / ImageToBoundingBoxFromThreshold.h
1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
4
5 #ifndef __cpExtensions__Algorithms__ImageToBoundingBoxFromThreshold__h__
6 #define __cpExtensions__Algorithms__ImageToBoundingBoxFromThreshold__h__
7
8 #include <itkObject.h>
9 #include <itkObjectFactory.h>
10
11 namespace cpExtensions
12 {
13   namespace Algorithms
14   {
15     /**
16      */
17     template< class _TImage >
18     class ImageToBoundingBoxFromThreshold
19       : public itk::Object
20     {
21     public:
22       typedef ImageToBoundingBoxFromThreshold Self;
23       typedef itk::Object                     Superclass;
24       typedef itk::SmartPointer< Self >       Pointer;
25       typedef itk::SmartPointer< const Self > ConstPointer;
26
27       typedef _TImage TImage;
28       typedef typename TImage::PixelType  TPixel;
29       typedef typename TImage::IndexType  TIndex;
30       typedef typename TImage::RegionType TRegion;
31
32     public:
33       itkNewMacro( Self );
34       itkTypeMacro( ImageToBoundingBoxFromThreshold, itkObject );
35
36       itkGetConstObjectMacro( Image, TImage );
37       itkGetConstMacro( LowerThreshold, TPixel );
38       itkGetConstMacro( UpperThreshold, TPixel );
39       itkGetConstMacro( Region, TRegion );
40       itkGetConstMacro( PAD, unsigned int );
41
42       itkSetConstObjectMacro( Image, TImage );
43       itkSetMacro( LowerThreshold, TPixel );
44       itkSetMacro( UpperThreshold, TPixel );
45       itkSetMacro( Region, TRegion );
46       itkSetMacro( PAD, unsigned int );
47
48     public:
49       void Compute( );
50
51     protected:
52       ImageToBoundingBoxFromThreshold( );
53       virtual ~ImageToBoundingBoxFromThreshold( );
54
55     private:
56       // Purposely not implemented.
57       ImageToBoundingBoxFromThreshold( const Self& );
58       void operator=( const Self& );
59
60     protected:
61       typename TImage::ConstPointer m_Image;
62       TPixel m_LowerThreshold;
63       TPixel m_UpperThreshold;
64       TRegion m_Region;
65       unsigned int m_PAD;
66     };
67
68   } // ecapseman
69
70 } // ecapseman
71
72 #ifndef ITK_MANUAL_INSTANTIATION
73 #  include <cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.hxx>
74 #endif // ITK_MANUAL_INSTANTIATION
75
76 #endif // __cpExtensions__Algorithms__ImageToBoundingBoxFromThreshold__h__
77
78 // eof - $RCSfile$