]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Algorithms/RegionOfInterestImageCalculator.h
84102adf7fb63b0b4994856fe203d3a58b279e24
[cpPlugins.git] / lib / cpExtensions / Algorithms / RegionOfInterestImageCalculator.h
1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
4
5 #ifndef __CPEXTENSIONS__ALGORITHMS__REGIONOFINTERESTIMAGECALCULATOR__H__
6 #define __CPEXTENSIONS__ALGORITHMS__REGIONOFINTERESTIMAGECALCULATOR__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 RegionOfInterestImageCalculator
19       : public itk::Object
20     {
21     public:
22       // Basic types
23       typedef RegionOfInterestImageCalculator Self;
24       typedef itk::Object                     Superclass;
25       typedef itk::SmartPointer< Self >       Pointer;
26       typedef itk::SmartPointer< const Self > ConstPointer;
27
28       typedef _TImage TImage;
29       typedef typename _TImage::IndexType TIndex;
30       typedef typename _TImage::PixelType TPixel;
31
32     public:
33       itkNewMacro( Self );
34       itkTypeMacro( RegionOfInterestImageCalculator, itkObject );
35
36       itkGetConstObjectMacro( Image, _TImage );
37       itkGetConstMacro( BackgroundValue, TPixel );
38       itkGetConstMacro( Minimum, TIndex );
39       itkGetConstMacro( Maximum, TIndex );
40
41       itkSetConstObjectMacro( Image, _TImage );
42       itkSetMacro( BackgroundValue, TPixel );
43
44     public:
45       void Compute( );
46       
47     protected:
48       RegionOfInterestImageCalculator( );
49       virtual ~RegionOfInterestImageCalculator( );
50
51     private:
52       // Purposely not implemented
53       RegionOfInterestImageCalculator( const Self& );
54       void operator=( const Self& );
55
56     protected:
57       typename _TImage::ConstPointer m_Image;
58       TPixel m_BackgroundValue;
59       TIndex m_Minimum;
60       TIndex m_Maximum;
61     };
62
63   } // ecapseman
64
65 } // ecapseman
66
67 #ifndef ITK_MANUAL_INSTANTIATION
68 #  include <cpExtensions/Algorithms/RegionOfInterestImageCalculator.hxx>
69 #endif // ITK_MANUAL_INSTANTIATION
70
71 #endif // __CPEXTENSIONS__ALGORITHMS__REGIONOFINTERESTIMAGECALCULATOR__H__
72
73 // eof - $RCSfile$