Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkMixtureModelComponentBase.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkMixtureModelComponentBase.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/12/15 01:00:46 $ 00007 Version: $Revision: 1.8 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkMixtureModelComponentBase_h 00018 #define __itkMixtureModelComponentBase_h 00019 00020 #include <vnl/vnl_vector.h> 00021 #include <vnl/vnl_matrix.h> 00022 00023 #include "itkArray.h" 00024 #include "itkObject.h" 00025 #include "itkMembershipFunctionBase.h" 00026 00027 namespace itk{ 00028 namespace Statistics{ 00029 00052 template< class TSample > 00053 class MixtureModelComponentBase : 00054 public Object 00055 { 00056 public: 00058 typedef MixtureModelComponentBase Self; 00059 typedef Object Superclass ; 00060 typedef SmartPointer<Self> Pointer; 00061 typedef SmartPointer<const Self> ConstPointer; 00062 00064 itkTypeMacro(MixtureModelComponentBase, Object); 00065 itkNewMacro(Self) ; 00066 00067 typedef typename TSample::MeasurementVectorType MeasurementVectorType ; 00068 00070 typedef MembershipFunctionBase< MeasurementVectorType > 00071 MembershipFunctionType ; 00072 00074 typedef Array< double > WeightArrayType ; 00075 00076 typedef Array< double > ParametersType ; 00077 00079 virtual void SetSample(const TSample* sample) ; 00080 00082 const TSample* GetSample() const; 00083 00088 MembershipFunctionType* GetMembershipFunction() ; 00089 00090 void SetMinimalParametersChange(double change) 00091 { m_MinimalParametersChange = change ; } 00092 00093 double GetMinimalParametersChange() 00094 { return m_MinimalParametersChange ; } 00095 00096 virtual void SetParameters(const ParametersType &parameters) ; 00097 00098 virtual ParametersType GetFullParameters() 00099 { return m_Parameters ; } 00100 00101 00104 void AreParametersModified(bool flag) ; 00105 00107 bool AreParametersModified() ; 00108 00110 void SetWeight(int index, double value) ; 00111 00113 double GetWeight(int index) ; 00114 00116 double Evaluate(MeasurementVectorType& measurements) ; 00117 00119 WeightArrayType* GetWeights() ; 00120 00121 virtual void Update() ; 00122 00123 protected: 00124 MixtureModelComponentBase() ; 00125 virtual ~MixtureModelComponentBase() ; 00126 void PrintSelf(std::ostream& os, Indent indent) const; 00127 00129 void CreateWeightArray() ; 00131 void DeleteWeightArray() ; 00135 void SetMembershipFunction(MembershipFunctionType* function) ; 00136 00137 virtual void GenerateData() ; 00138 00139 private: 00141 const TSample* m_Sample ; 00142 00143 double m_MinimalParametersChange ; 00144 00145 ParametersType m_Parameters ; 00147 MembershipFunctionType* m_MembershipFunction ; 00149 WeightArrayType* m_Weights ; 00151 bool m_ParametersModified ; 00152 00153 } ; // end of class 00154 00155 } // end of namespace Statistics 00156 } // end of namespace itk 00157 00158 #ifndef ITK_MANUAL_INSTANTIATION 00159 #include "itkMixtureModelComponentBase.txx" 00160 #endif 00161 00162 #endif 00163

Generated at Sun Apr 1 02:38:04 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000