]> Creatis software - cpPlugins.git/blob - lib/ivq/ITK/ImageStatisticsFromSeeds.h
c9c24f1b76b8b0f762f98b79e3cd298f3e5cc6e3
[cpPlugins.git] / lib / ivq / ITK / ImageStatisticsFromSeeds.h
1 /* =======================================================================
2  * @author: Leonardo Florez-Valencia
3  * @email: florez-l@javeriana.edu.co
4  * =======================================================================
5  */
6
7 #ifndef __ivq__ITK__ImageStatisticsFromSeeds__h__
8 #define __ivq__ITK__ImageStatisticsFromSeeds__h__
9
10 #include <set>
11 #include <itkObject.h>
12
13 namespace ivq
14 {
15   namespace ITK
16   {
17     /**
18      */
19     template< class _TImage >
20     class ImageStatisticsFromSeeds
21       : public itk::Object
22     {
23     public:
24       typedef itk::Object                     Superclass;
25       typedef ImageStatisticsFromSeeds        Self;
26       typedef itk::SmartPointer< Self >       Pointer;
27       typedef itk::SmartPointer< const Self > ConstPointer;
28
29       typedef _TImage TImage;
30       typedef typename TImage::IndexType TIndex;
31
32       typedef typename TIndex::LexicographicCompare TIndexCompare;
33       typedef std::set< TIndex, TIndexCompare > TIndices;
34
35     public:
36       itkNewMacro( Self );
37       itkTypeMacro( ivq::ITK::ImageStatisticsFromSeeds, itk::Object );
38
39       itkGetConstObjectMacro( Image, TImage );
40       itkGetConstMacro( Indices, TIndices );
41       itkGetConstMacro( Mean, double );
42       itkGetConstMacro( Deviation, double );
43       itkGetConstMacro( Radius, unsigned int );
44
45       itkSetConstObjectMacro( Image, TImage );
46       itkSetMacro( Radius, unsigned int );
47
48     public:
49       unsigned int GetNumberOfIndices( ) const;
50       void ClearIndices( );
51       void AddIndex( const TIndex& i );
52       void RemoveIndex( const TIndex& i );
53       void Compute( );
54
55     protected:
56       ImageStatisticsFromSeeds( );
57       virtual ~ImageStatisticsFromSeeds( );
58
59     private:
60       // Purposely not implemented
61       ImageStatisticsFromSeeds( Self& other );
62       Self& operator=( Self& other );
63
64     protected:
65       typename TImage::ConstPointer m_Image;
66       TIndices     m_Indices;
67       double       m_Mean;
68       double       m_Deviation;
69       unsigned int m_Radius;
70     };
71
72   } // ecapseman
73
74 } // ecapseman
75
76 #ifndef ITK_MANUAL_INSTANTIATION
77 #  include <ivq/ITK/ImageStatisticsFromSeeds.hxx>
78 #endif // ITK_MANUAL_INSTANTIATION
79
80 #endif // __ivq__ITK__ImageStatisticsFromSeeds__h__
81
82 // eof - $RCSfile$