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