1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
5 #ifndef __CPPLUGINS__EXTENSIONS__ALGORITHMS__ITERATIVEGAUSSIANMODELESTIMATOR__H__
6 #define __CPPLUGINS__EXTENSIONS__ALGORITHMS__ITERATIVEGAUSSIANMODELESTIMATOR__H__
9 #include <itkConceptChecking.h>
10 #include <itkObject.h>
11 #include <vnl/vnl_matrix.h>
21 template< class S, unsigned int D >
22 class IterativeGaussianModelEstimator
26 typedef IterativeGaussianModelEstimator Self;
27 typedef itk::Object Superclass;
28 typedef itk::SmartPointer< Self > Pointer;
29 typedef itk::SmartPointer< const Self > ConstPointer;
32 itkStaticConstMacro( Dimension, unsigned int, D );
34 // Begin concept checking
35 #ifdef ITK_USE_CONCEPT_CHECKING
37 ScalarTypeHasFloatResolution,
38 ( itk::Concept::IsFloatingPoint< S > )
41 // End concept checking
43 typedef vnl_matrix< S > TMatrix;
44 typedef std::vector< TMatrix > TMatrices;
48 itkTypeMacro( IterativeGaussianModelEstimator, itkObject );
50 itkGetConstMacro( MinimumProbability, S );
51 itkGetConstMacro( MaximumProbability, S );
54 unsigned long GetNumberOfSamples( ) const
55 { return( this->m_Samples.size( ) ); }
60 S Probability( const V& sample ) const;
62 S Probability( const S& s_x, const S& s_y, ... ) const;
64 template< class V, class M >
65 void GetModel( V& m, M& E ) const;
70 void AddSample( const V& sample );
72 void AddSample( const S& s_x, const S& s_y, ... );
75 IterativeGaussianModelEstimator( );
76 virtual ~IterativeGaussianModelEstimator( );
79 // Purposely not implemented
80 IterativeGaussianModelEstimator( const Self& other );
81 void operator=( const Self& other );
94 S m_MinimumProbability;
95 S m_MaximumProbability;
104 #include <cpPlugins/Extensions/Algorithms/IterativeGaussianModelEstimator.hxx>
106 #endif // __CPPLUGINS__EXTENSIONS__ALGORITHMS__ITERATIVEGAUSSIANMODELESTIMATOR__H__