]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Algorithms/GulsunTekMedialness.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Algorithms / GulsunTekMedialness.h
1 #ifndef __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__
2 #define __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__
3
4 #include <cpExtensions/Algorithms/GradientImageFunctionBase.h>
5
6 namespace cpExtensions
7 {
8   namespace Algorithms
9   {
10     /**
11      */
12     template< class _TGradient, class _TMask = itk::Image< unsigned char, _TGradient::ImageDimension > >
13     class GulsunTekMedialness
14       : public GradientImageFunctionBase< _TGradient, _TMask >
15     {
16     public:
17       typedef GulsunTekMedialness                             Self;
18       typedef GradientImageFunctionBase< _TGradient, _TMask > Superclass;
19       typedef itk::SmartPointer< Self >                       Pointer;
20       typedef itk::SmartPointer< const Self >                 ConstPointer;
21
22       itkStaticConstMacro( Dimension, unsigned int, Superclass::Dimension );
23
24       typedef typename Superclass::TOutput TOutput;
25       typedef typename Superclass::TScalar TScalar;
26       typedef typename Superclass::TIndex  TIndex;
27       typedef typename Superclass::TVector TVector;
28       typedef typename Superclass::TPoint  TPoint;
29       typedef typename TIndex::OffsetType  TOffset;
30
31       typedef std::vector< double >  TProfile;
32       typedef std::vector< TOffset > TOffsets;
33
34     public:
35       itkNewMacro( Self );
36       itkTypeMacro( GulsunTekMedialness, GradientImageFunctionBase );
37
38       itkGetConstMacro( MinRadius, double );
39       itkGetConstMacro( MaxRadius, double );
40       itkGetConstMacro( ProfileSampling, unsigned int );
41       itkGetConstMacro( RadialSampling, unsigned int );
42
43       itkSetMacro( MinRadius, double );
44       itkSetMacro( MaxRadius, double );
45       itkSetMacro( ProfileSampling, unsigned int );
46       itkSetMacro( RadialSampling, unsigned int );
47
48     protected:
49       GulsunTekMedialness( );
50       virtual ~GulsunTekMedialness( );
51
52       virtual TOutput _Evaluate( const TIndex& i ) const cpExtensions_OVERRIDE;
53
54     private:
55       // Purposely not implemented.
56       GulsunTekMedialness( const Self& );
57       void operator=( const Self& );
58
59     protected:
60       double       m_MinRadius;
61       double       m_MaxRadius;
62       unsigned int m_ProfileSampling;
63       unsigned int m_RadialSampling;
64     };
65
66   } // ecapseman
67
68 } // ecapseman
69
70 #ifndef ITK_MANUAL_INSTANTIATION
71 #  include <cpExtensions/Algorithms/GulsunTekMedialness.hxx>
72 #endif // ITK_MANUAL_INSTANTIATION
73
74 #endif // __CPEXTENSIONS__ALGORITHMS__GULSUNTEKMEDIALNESS__H__
75
76 // eof - $RCSfile$