<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ITK: itkMixtureModelComponentBase.h Source File</title> <link href="DoxygenStyle.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Section customized for INSIGHT : Tue Jul 17 01:02:45 2001 --> <center> <a href="index.html" class="qindex">Main Page</a> <a href="modules.html" class="qindex">Groups</a> <a href="namespaces.html" class="qindex">Namespace List</a> <a href="hierarchy.html" class="qindex">Class Hierarchy</a> <a href="classes.html" class="qindex">Alphabetical List</a> <a href="annotated.html" class="qindex">Compound List</a> <a href="files.html" class="qindex">File List</a> <a href="namespacemembers.html" class="qindex">Namespace Members</a> <a href="functions.html" class="qindex">Compound Members</a> <a href="globals.html" class="qindex">File Members</a> <a href="pages.html" class="qindex">Concepts</a></center> <!-- Generated by Doxygen 1.5.9 --> <div class="navpath"><a class="el" href="dir_02e23d841c198393a6e961e9a0678fff.html">Code</a> » <a class="el" href="dir_2c33022d19e8077162952ea9ed57656d.html">Numerics</a> » <a class="el" href="dir_e82fe55e9fab4124d6625d716e091a5f.html">Statistics</a> </div> <div class="contents"> <h1>itkMixtureModelComponentBase.h</h1><a href="itkMixtureModelComponentBase_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span> <a name="l00002"></a>00002 <span class="comment"></span> <a name="l00003"></a>00003 <span class="comment"> Program: Insight Segmentation & Registration Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: itkMixtureModelComponentBase.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2005-07-26 15:55:04 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.9 $</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> Copyright (c) Insight Software Consortium. All rights reserved.</span> <a name="l00010"></a>00010 <span class="comment"> See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.</span> <a name="l00011"></a>00011 <span class="comment"></span> <a name="l00012"></a>00012 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even </span> <a name="l00013"></a>00013 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR </span> <a name="l00014"></a>00014 <span class="comment"> PURPOSE. See the above copyright notices for more information.</span> <a name="l00015"></a>00015 <span class="comment"></span> <a name="l00016"></a>00016 <span class="comment">=========================================================================*/</span> <a name="l00017"></a>00017 <span class="preprocessor">#ifndef __itkMixtureModelComponentBase_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkMixtureModelComponentBase_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include <vnl/vnl_vector.h></span> <a name="l00021"></a>00021 <span class="preprocessor">#include <vnl/vnl_matrix.h></span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkArray_8h.html">itkArray.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkObject_8h.html">itkObject.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkMembershipFunctionBase_8h.html">itkMembershipFunctionBase.h</a>"</span> <a name="l00026"></a>00026 <a name="l00027"></a>00027 <span class="keyword">namespace </span>itk{ <a name="l00028"></a>00028 <span class="keyword">namespace </span>Statistics{ <a name="l00029"></a>00029 <a name="l00052"></a>00052 <span class="keyword">template</span>< <span class="keyword">class</span> TSample > <a name="l00053"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html">00053</a> <span class="keyword">class </span><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html" title="base class for distribution modules that supports analytical way to update the distribution...">MixtureModelComponentBase</a> : <a name="l00054"></a>00054 <span class="keyword">public</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> <a name="l00055"></a>00055 { <a name="l00056"></a>00056 <span class="keyword">public</span>: <a name="l00058"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#8326392a4dc0d95b7e74907063e6c35d">00058</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html" title="base class for distribution modules that supports analytical way to update the distribution...">MixtureModelComponentBase</a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>; <a name="l00059"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#99c894d6c89491ec957251d9b3c68d2e">00059</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Superclass</a> ; <a name="l00060"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#d8120f749efe3b5a4b4d76cb8eab5a4f">00060</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<Self></a> <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>; <a name="l00061"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#bff8dff85e72f159b3cf78b83a995566">00061</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer<const Self></a> <a class="code" href="classitk_1_1SmartPointer.html">ConstPointer</a>; <a name="l00062"></a>00062 <a name="l00064"></a>00064 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html" title="base class for distribution modules that supports analytical way to update the distribution...">MixtureModelComponentBase</a>, <a class="code" href="classitk_1_1Object.html" title="Base class for most itk classes.">Object</a>); <a name="l00065"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#087e1adb70adf58d97ba7fd0b785ce25">00065</a> <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>) ; <a name="l00067"></a>00067 <a name="l00068"></a>00068 <span class="keyword">typedef</span> <span class="keyword">typename</span> TSample::MeasurementVectorType <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#087e1adb70adf58d97ba7fd0b785ce25">MeasurementVectorType</a> ; <a name="l00069"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#39f3c3a4fa41f7089fc57465ffb5c9e2">00069</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> TSample::MeasurementVectorSizeType <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#39f3c3a4fa41f7089fc57465ffb5c9e2">MeasurementVectorSizeType</a>; <a name="l00070"></a>00070 <a name="l00072"></a>00072 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Statistics_1_1MembershipFunctionBase.html" title="MembershipFunctionBase class declares common interfaces for membership functions...">MembershipFunctionBase< MeasurementVectorType ></a> <a name="l00073"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#aee4228e95b9bd14454f27e2018baac7">00073</a> <a class="code" href="classitk_1_1Statistics_1_1MembershipFunctionBase.html" title="MembershipFunctionBase class declares common interfaces for membership functions...">MembershipFunctionType</a> ; <a name="l00074"></a>00074 <a name="l00076"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#5d2b4cb11cdf802b52f3cd22b08ec954">00076</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Array.html">Array< double ></a> <a class="code" href="classitk_1_1Array.html">WeightArrayType</a> ; <a name="l00077"></a>00077 <a name="l00078"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#510f71c9bd3c1b348549bf2db671b058">00078</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Array.html">Array< double ></a> <a class="code" href="classitk_1_1Array.html">ParametersType</a> ; <a name="l00079"></a>00079 <a name="l00081"></a>00081 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#12e467d4576bee68bf33b2838572890d">SetSample</a>(<span class="keyword">const</span> TSample* sample) ; <a name="l00082"></a>00082 <a name="l00084"></a>00084 <span class="keyword">const</span> TSample* <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#3f2dc059f57d2b180566363b63c09fec">GetSample</a>() <span class="keyword">const</span>; <a name="l00085"></a>00085 <a name="l00090"></a>00090 <a class="code" href="classitk_1_1Statistics_1_1MembershipFunctionBase.html" title="MembershipFunctionBase class declares common interfaces for membership functions...">MembershipFunctionType</a>* <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#195f8ab0ba818182c28665c55ceaeb99">GetMembershipFunction</a>() ; <a name="l00091"></a>00091 <a name="l00092"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#7221438c69394fee305cc5a2287db29e">00092</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#7221438c69394fee305cc5a2287db29e">SetMinimalParametersChange</a>(<span class="keywordtype">double</span> change) <a name="l00093"></a>00093 { m_MinimalParametersChange = change ; } <a name="l00094"></a>00094 <a name="l00095"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#30ec734619bed616604f4d5c72469d82">00095</a> <span class="keywordtype">double</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#30ec734619bed616604f4d5c72469d82">GetMinimalParametersChange</a>() <a name="l00096"></a>00096 { <span class="keywordflow">return</span> m_MinimalParametersChange ; } <a name="l00097"></a>00097 <a name="l00098"></a>00098 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#2c04dffa939247db258fea4098f1d43e">SetParameters</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#510f71c9bd3c1b348549bf2db671b058">ParametersType</a> &parameters) ; <a name="l00099"></a>00099 <a name="l00100"></a><a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#c8e507c699a6f804eaa0ea4eeaf45eee">00100</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1Array.html">ParametersType</a> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#c8e507c699a6f804eaa0ea4eeaf45eee">GetFullParameters</a>() <a name="l00101"></a>00101 { <span class="keywordflow">return</span> m_Parameters ; } <a name="l00102"></a>00102 <a name="l00103"></a>00103 <a name="l00106"></a>00106 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#2cd1c0929acd29ba74a5a2b502bea954">AreParametersModified</a>(<span class="keywordtype">bool</span> flag) ; <a name="l00107"></a>00107 <a name="l00109"></a>00109 <span class="keywordtype">bool</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#2cd1c0929acd29ba74a5a2b502bea954">AreParametersModified</a>() ; <a name="l00110"></a>00110 <a name="l00112"></a>00112 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#d6325945567b4676faae65eac39f3af3">SetWeight</a>(<span class="keywordtype">int</span> index, <span class="keywordtype">double</span> value) ; <a name="l00113"></a>00113 <a name="l00115"></a>00115 <span class="keywordtype">double</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#0daf4a98bcc19e6258ce26fdb98ffefa">GetWeight</a>(<span class="keywordtype">int</span> index) ; <a name="l00116"></a>00116 <a name="l00118"></a>00118 <span class="keywordtype">double</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#d5f9851f04085423bcbd30564b32c390">Evaluate</a>(<a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#087e1adb70adf58d97ba7fd0b785ce25">MeasurementVectorType</a>& measurements) ; <a name="l00119"></a>00119 <a name="l00121"></a>00121 <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#5d2b4cb11cdf802b52f3cd22b08ec954">WeightArrayType</a>* <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#345382f813e54dad30173c46fdc07ae0">GetWeights</a>() ; <a name="l00122"></a>00122 <a name="l00123"></a>00123 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#44c118923ce5582ab8e3a228cac5db41">Update</a>() ; <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keyword">protected</span>: <a name="l00126"></a>00126 <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#41b712707ec5bbf20eea1e0daa864bd4">MixtureModelComponentBase</a>() ; <a name="l00127"></a>00127 <span class="keyword">virtual</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#dd8bfe8c4cc40ac8c547a013af1922c8">~MixtureModelComponentBase</a>() ; <a name="l00128"></a>00128 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#d83c42b3e708ddd6601b9b8fb4ad9565">PrintSelf</a>(std::ostream& os, <a class="code" href="classitk_1_1Indent.html" title="Control indentation during Print() invocation.">Indent</a> indent) <span class="keyword">const</span>; <a name="l00129"></a>00129 <a name="l00131"></a>00131 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#499f0c0211864f8cb03e04f7e3f1b4a2">CreateWeightArray</a>() ; <a name="l00132"></a>00132 <a name="l00134"></a>00134 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#6a25be492bac896c4ddc1acabb2c6478">DeleteWeightArray</a>() ; <a name="l00135"></a>00135 <a name="l00139"></a>00139 <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#cdc59b2a972f3c8935705ffb50f45991">SetMembershipFunction</a>(<a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#aee4228e95b9bd14454f27e2018baac7">MembershipFunctionType</a>* function) ; <a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#c5de392482bd139b7971f4df81f41433">GenerateData</a>() ; <a name="l00142"></a>00142 <a name="l00143"></a>00143 <span class="keyword">private</span>: <a name="l00145"></a>00145 <span class="keyword">const</span> TSample* m_Sample ; <a name="l00146"></a>00146 <a name="l00147"></a>00147 <span class="keywordtype">double</span> m_MinimalParametersChange ; <a name="l00148"></a>00148 <a name="l00149"></a>00149 <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#510f71c9bd3c1b348549bf2db671b058">ParametersType</a> m_Parameters ; <a name="l00151"></a>00151 <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#aee4228e95b9bd14454f27e2018baac7">MembershipFunctionType</a>* m_MembershipFunction ; <a name="l00152"></a>00152 <a name="l00154"></a>00154 <a class="code" href="classitk_1_1Statistics_1_1MixtureModelComponentBase.html#5d2b4cb11cdf802b52f3cd22b08ec954">WeightArrayType</a>* m_Weights ; <a name="l00155"></a>00155 <a name="l00157"></a>00157 <span class="keywordtype">bool</span> m_ParametersModified ; <a name="l00158"></a>00158 <a name="l00159"></a>00159 } ; <span class="comment">// end of class</span> <a name="l00160"></a>00160 <a name="l00161"></a>00161 } <span class="comment">// end of namespace Statistics </span> <a name="l00162"></a>00162 } <span class="comment">// end of namespace itk </span> <a name="l00163"></a>00163 <a name="l00164"></a>00164 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00165"></a>00165 <span class="preprocessor"></span><span class="preprocessor">#include "itkMixtureModelComponentBase.txx"</span> <a name="l00166"></a>00166 <span class="preprocessor">#endif</span> <a name="l00167"></a>00167 <span class="preprocessor"></span> <a name="l00168"></a>00168 <span class="preprocessor">#endif</span> <a name="l00169"></a>00169 <span class="preprocessor"></span> <a name="l00170"></a>00170 </pre></div></div> <hr><address><small> Generated at Thu May 7 23:32:30 2009 for ITK by <a href="http://www.stack.nl/~dimitri/doxygen/index.html"> <img src="http://www.stack.nl/~dimitri/doxygen/doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53> </a> 1.5.9 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2000</small></address> </body> </html>