]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/Base/Functors/GaussianModel.h
...
[FrontAlgorithms.git] / lib / fpa / Base / Functors / GaussianModel.h
1 #ifndef __fpa__Base__Functors__GaussianModel__h__
2 #define __fpa__Base__Functors__GaussianModel__h__
3
4 #include <fpa/Config.h>
5 #include <itkFunctionBase.h>
6 #include <cpExtensions/Algorithms/IterativeGaussianModelEstimator.h>
7
8 namespace fpa
9 {
10   namespace Base
11   {
12     namespace Functors
13     {
14       /**
15        */
16       template< class _TInput, class _TOutput >
17       class GaussianModel
18         : public itk::FunctionBase< _TInput, _TOutput >
19       {
20       public:
21         typedef GaussianModel                                Self;
22         typedef itk::FunctionBase< _TInput, _TOutput > Superclass;
23         typedef itk::SmartPointer< Self >              Pointer;
24         typedef itk::SmartPointer< const Self >        ConstPointer;
25
26         typedef _TInput  TInput;
27         typedef _TOutput TOutput;
28
29         // Model estimator
30         typedef
31         cpExtensions::Algorithms::IterativeGaussianModelEstimator< TOutput, 1 >
32         TModel;
33
34       public:
35         itkNewMacro( Self );
36         itkTypeMacro( GaussianModel, itk::FunctionBase );
37
38         itkGetConstMacro( SupportSize, unsigned int );
39         itkGetConstMacro( MinimumCost, TOutput );
40         itkGetObjectMacro( Model, TModel );
41         itkGetConstObjectMacro( Model, TModel );
42         itkSetMacro( SupportSize, unsigned int );
43         itkSetMacro( MinimumCost, TOutput );
44
45       public:
46         virtual TOutput Evaluate( const TInput& x ) const fpa_OVERRIDE;
47
48       protected:
49         GaussianModel( );
50         virtual ~GaussianModel( );
51
52       private:
53         // Purposely not implemented
54         GaussianModel( const Self& other );
55         Self& operator=( const Self& other );
56
57       protected:
58         unsigned int m_SupportSize;
59         TOutput m_MinimumCost;
60         typename TModel::Pointer m_Model;
61       };
62
63     } // ecapseman
64
65   } // ecapseman
66
67 } // ecapseman
68
69 #ifndef ITK_MANUAL_INSTANTIATION
70 #  include <fpa/Base/Functors/GaussianModel.hxx>
71 #endif // ITK_MANUAL_INSTANTIATION
72
73 #endif // __fpa__Base__Functors__GaussianModel__h__
74
75 // eof - $RCSfile$