]> 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         /* TODO
39            itkGetConstMacro( SupportSize, unsigned int );
40            itkGetConstMacro( MinimumCost, TOutput );
41            itkGetObjectMacro( Model, TModel );
42            itkGetConstObjectMacro( Model, TModel );
43            itkSetMacro( SupportSize, unsigned int );
44            itkSetMacro( MinimumCost, TOutput );
45         */
46
47       public:
48         virtual TOutput Evaluate( const TInput& x ) const override;
49
50       protected:
51         GaussianModel( );
52         virtual ~GaussianModel( );
53
54       private:
55         // Purposely not implemented
56         GaussianModel( const Self& other );
57         Self& operator=( const Self& other );
58
59       protected:
60         /* TODO
61            unsigned int m_SupportSize;
62            TOutput m_MinimumCost;
63            typename TModel::Pointer m_Model;
64         */
65         mutable double m_S1;
66         mutable double m_S2;
67         mutable unsigned long m_N;
68       };
69
70     } // ecapseman
71
72   } // ecapseman
73
74 } // ecapseman
75
76 #ifndef ITK_MANUAL_INSTANTIATION
77 #  include <fpa/Base/Functors/GaussianModel.hxx>
78 #endif // ITK_MANUAL_INSTANTIATION
79
80 #endif // __fpa__Base__Functors__GaussianModel__h__
81
82 // eof - $RCSfile$