<!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: itkListSample.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>itkListSample.h</h1><a href="itkListSample_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: itkListSample.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2007-02-16 14:53:28 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.29 $</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 __itkListSample_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkListSample_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="itkObjectFactory_8h.html">itkObjectFactory.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkMacro_8h.html">itkMacro.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkListSampleBase_8h.html">itkListSampleBase.h</a>"</span> <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkFixedArray_8h.html">itkFixedArray.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkSmartPointer_8h.html">itkSmartPointer.h</a>"</span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="preprocessor">#include <vector></span> <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="keyword">namespace </span>itk{ <a name="l00029"></a>00029 <span class="keyword">namespace </span>Statistics{ <a name="l00030"></a>00030 <a name="l00045"></a>00045 <span class="keyword">template</span>< <span class="keyword">class</span> TMeasurementVector > <a name="l00046"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html">00046</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample.html" title="This class is the native implementation of the ListSampleBase.">ListSample</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Statistics_1_1ListSampleBase.html" title="This class is the base class for Samples that store measurements in a list.">ListSampleBase</a>< TMeasurementVector > <a name="l00047"></a>00047 { <a name="l00048"></a>00048 <span class="keyword">public</span>: <a name="l00050"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#f95070cdb043dfffc770af251c168018">00050</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample.html" title="This class is the native implementation of the ListSampleBase.">ListSample</a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>; <a name="l00051"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#cfead8e4b55446a6b4ef595351fe326f">00051</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Statistics_1_1ListSampleBase.html" title="This class is the base class for Samples that store measurements in a list.">ListSampleBase< TMeasurementVector ></a> <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Superclass</a>; <a name="l00052"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#aff6d1328a5ad033edbe94bbba13d2d1">00052</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="l00053"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#55540086fc2466df7803a90ca12a8e3b">00053</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="l00054"></a>00054 <a name="l00056"></a>00056 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1Statistics_1_1ListSample.html" title="This class is the native implementation of the ListSampleBase.">ListSample</a>, <a class="code" href="classitk_1_1Statistics_1_1ListSampleBase.html" title="This class is the base class for Samples that store measurements in a list.">ListSampleBase</a>); <a name="l00057"></a>00057 <a name="l00059"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#656026292f849dd15a7b40769896be08">00059</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="l00060"></a>00060 <a name="l00062"></a>00062 <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::MeasurementVectorType MeasurementVectorType; <a name="l00063"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#5e01c6d8cb8cdae29ad36723e11b439b">00063</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::MeasurementVectorSizeType MeasurementVectorSizeType; <a name="l00064"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#7ffd0b85800bf4e5c74432237cc15ff5">00064</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::MeasurementType MeasurementType; <a name="l00065"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#429ab9b7e49adc7c97944fa12d80dd3c">00065</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::FrequencyType FrequencyType ; <a name="l00066"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#cc40e2c97811d246389ead3e18a94ec2">00066</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::TotalFrequencyType TotalFrequencyType ; <a name="l00067"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#4afb0ab0c5f23377c9b264caae1e839b">00067</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::InstanceIdentifier InstanceIdentifier; <a name="l00068"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#7faf4ccdd41aa209383f32af7a6e2aba">00068</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::SearchResultVectorType SearchResultVectorType ; <a name="l00069"></a>00069 <a name="l00072"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#0532f8cc2aedce66e660b2fc9e5e42c5">00072</a> <span class="keyword">typedef</span> MeasurementVectorType ValueType ; <a name="l00073"></a>00073 <a name="l00074"></a>00074 <a name="l00076"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#f2513c693ff1c0e11296ceb4e367383a">00076</a> <span class="keyword">typedef</span> std::vector< MeasurementVectorType > InternalDataContainerType ; <a name="l00077"></a>00077 <a name="l00083"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#c49afcd4709c504054837ec78d773cd0">00083</a> <span class="keywordtype">void</span> Resize( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n ) <a name="l00084"></a>00084 { m_InternalContainer.resize(n) ; } <a name="l00085"></a>00085 <a name="l00087"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#985d13fe61a834e7397be2412179ce27">00087</a> <span class="keywordtype">void</span> Clear() <a name="l00088"></a>00088 { m_InternalContainer.clear() ; } <a name="l00089"></a>00089 <a name="l00091"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#c1f797759cddbb334dc42244c76d5c76">00091</a> <span class="keywordtype">void</span> PushBack( MeasurementVectorType mv ) <a name="l00092"></a>00092 { m_InternalContainer.push_back( mv ) ; } <a name="l00093"></a>00093 <a name="l00095"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#d1808c3b6c7ff9736cc2a8712cceda60">00095</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size</a>()<span class="keyword"> const</span> <a name="l00096"></a>00096 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>( m_InternalContainer.size() ); } <a name="l00097"></a>00097 <a name="l00100"></a>00100 <span class="keyword">const</span> MeasurementVectorType & GetMeasurementVector(<span class="keyword">const</span> InstanceIdentifier &<span class="keywordtype">id</span>) <span class="keyword">const</span>; <a name="l00101"></a>00101 <a name="l00103"></a>00103 <span class="keywordtype">void</span> SetMeasurement(<span class="keyword">const</span> InstanceIdentifier &<span class="keywordtype">id</span>, <a name="l00104"></a>00104 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> &dim, <a name="l00105"></a>00105 <span class="keyword">const</span> MeasurementType &value) ; <a name="l00106"></a>00106 <a name="l00108"></a>00108 <span class="keywordtype">void</span> SetMeasurementVector(<span class="keyword">const</span> InstanceIdentifier &<span class="keywordtype">id</span>, <a name="l00109"></a>00109 <span class="keyword">const</span> MeasurementVectorType &mv) ; <a name="l00110"></a>00110 <a name="l00113"></a>00113 FrequencyType GetFrequency(<span class="keyword">const</span> InstanceIdentifier &<span class="keywordtype">id</span>) <span class="keyword">const</span> ; <a name="l00114"></a>00114 <a name="l00117"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#221347b9a499e2bc37f7d5fe6445e80a">00117</a> TotalFrequencyType GetTotalFrequency()<span class="keyword"> const</span> <a name="l00118"></a>00118 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>TotalFrequencyType<span class="keyword">></span>( m_InternalContainer.size() ); } <a name="l00119"></a>00119 <a name="l00120"></a>00120 <span class="keyword">class </span>ConstIterator; <a name="l00121"></a>00121 <a name="l00122"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">00122</a> <span class="keyword">class </span><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> <a name="l00123"></a>00123 { <a name="l00124"></a>00124 <a name="l00125"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#5485970bb9da6b5d782fa28638b5658f">00125</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>; <a name="l00126"></a>00126 <a name="l00127"></a>00127 <span class="keyword">public</span>: <a name="l00128"></a>00128 <a name="l00129"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#800dedf6a7dec53c2bf2b435802770d8">00129</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#800dedf6a7dec53c2bf2b435802770d8">Iterator</a>(){} <a name="l00130"></a>00130 <a name="l00131"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#a2a7e9b942ee823e6dba2bb22e7779cc">00131</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a>(<span class="keyword">typename</span> InternalDataContainerType::iterator iter, <a name="l00132"></a>00132 InstanceIdentifier iid) <a name="l00133"></a>00133 :m_Iter(iter), m_InstanceIdentifier(iid) <a name="l00134"></a>00134 {} <a name="l00135"></a>00135 <a name="l00136"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#dcf2726612da4c4e6cd4d4d970b06fae">00136</a> FrequencyType GetFrequency()<span class="keyword"> const</span> <a name="l00137"></a>00137 <span class="keyword"> </span>{ <span class="keywordflow">return</span> 1 ;} <a name="l00138"></a>00138 <a name="l00139"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#e95e27c9c60d1f2d90d8a4f868aa0326">00139</a> <span class="keyword">const</span> MeasurementVectorType & GetMeasurementVector()<span class="keyword"> const</span> <a name="l00140"></a>00140 <span class="keyword"> </span>{ <span class="keywordflow">return</span> (MeasurementVectorType&) *m_Iter ;} <a name="l00141"></a>00141 <a name="l00142"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#8f9c5f6c87a571b3ced7bf5b63e403d7">00142</a> InstanceIdentifier GetInstanceIdentifier()<span class="keyword"> const</span> <a name="l00143"></a>00143 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_InstanceIdentifier ;} <a name="l00144"></a>00144 <a name="l00145"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#5c487d2e4c3bb62cfa59cda976528e2a">00145</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a>& operator++() <a name="l00146"></a>00146 { <a name="l00147"></a>00147 ++m_Iter; <a name="l00148"></a>00148 ++m_InstanceIdentifier; <a name="l00149"></a>00149 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00150"></a>00150 } <a name="l00151"></a>00151 <a name="l00152"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#9852f1532729941585afb7806266109e">00152</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a>& operator--() <a name="l00153"></a>00153 { <a name="l00154"></a>00154 --m_Iter ; <a name="l00155"></a>00155 --m_InstanceIdentifier; <a name="l00156"></a>00156 <span class="keywordflow">return</span> *this ; <a name="l00157"></a>00157 } <a name="l00158"></a>00158 <a name="l00159"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#b6d021b83bdcaa70d1ee4c3c51f7ce8d">00159</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#7bf30438b5d3bdc0eddbecd9b17baa3b">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> &it) <a name="l00160"></a>00160 { <a name="l00161"></a>00161 <span class="keywordflow">return</span> (m_Iter != it.m_Iter); <a name="l00162"></a>00162 } <a name="l00163"></a>00163 <a name="l00164"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#6e272a4607a4a7121bc6c374b3edd349">00164</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceitk.html#e1c1b02c301187419478f5126c789a01">operator==</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> &it) <a name="l00165"></a>00165 { <a name="l00166"></a>00166 <span class="keywordflow">return</span> (m_Iter == it.m_Iter); <a name="l00167"></a>00167 } <a name="l00168"></a>00168 <a name="l00169"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#1c12d0122b210218e8973adc4d527b7a">00169</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a>& operator =(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> & iter) <a name="l00170"></a>00170 { <a name="l00171"></a>00171 m_Iter = iter.m_Iter; <a name="l00172"></a>00172 m_InstanceIdentifier = iter.m_InstanceIdentifier ; <a name="l00173"></a>00173 <span class="keywordflow">return</span> *this ; <a name="l00174"></a>00174 } <a name="l00175"></a>00175 <a name="l00176"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html#f373d361c33cba502bd624cb4730b80a">00176</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> &iter) <a name="l00177"></a>00177 { <a name="l00178"></a>00178 m_Iter = iter.m_Iter; <a name="l00179"></a>00179 m_InstanceIdentifier = iter.m_InstanceIdentifier ; <a name="l00180"></a>00180 } <a name="l00181"></a>00181 <a name="l00182"></a>00182 <span class="keyword">private</span>: <a name="l00183"></a>00183 <span class="keyword">typename</span> InternalDataContainerType::iterator m_Iter ; <a name="l00184"></a>00184 InstanceIdentifier m_InstanceIdentifier ; <a name="l00185"></a>00185 } ; <a name="l00186"></a>00186 <a name="l00187"></a>00187 <a name="l00188"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">00188</a> <span class="keyword">class </span><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> <a name="l00189"></a>00189 { <a name="l00190"></a>00190 <span class="keyword">public</span>: <a name="l00191"></a>00191 <a name="l00192"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#563635f33c0258227e279070a6c2e0f7">00192</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#563635f33c0258227e279070a6c2e0f7">ConstIterator</a>(){} <a name="l00193"></a>00193 <a name="l00194"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#878cf46513a02e859e7d2539772b8593">00194</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>(<span class="keyword">typename</span> InternalDataContainerType::const_iterator iter, <a name="l00195"></a>00195 InstanceIdentifier iid) <a name="l00196"></a>00196 :m_Iter(iter), m_InstanceIdentifier(iid) <a name="l00197"></a>00197 {} <a name="l00198"></a>00198 <a name="l00199"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#c12788b20c0117861feefdd3a339a903">00199</a> FrequencyType GetFrequency()<span class="keyword"> const</span> <a name="l00200"></a>00200 <span class="keyword"> </span>{ <span class="keywordflow">return</span> 1 ;} <a name="l00201"></a>00201 <a name="l00202"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#e9e98f3bdfda56cb4d0f72327ad1d0a8">00202</a> <span class="keyword">const</span> MeasurementVectorType & GetMeasurementVector()<span class="keyword"> const</span> <a name="l00203"></a>00203 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keyword">const </span>MeasurementVectorType&<span class="keyword">></span>(*m_Iter) ;} <a name="l00204"></a>00204 <a name="l00205"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#2f99f53206c3ad6de17ab087a6f23482">00205</a> InstanceIdentifier GetInstanceIdentifier()<span class="keyword"> const</span> <a name="l00206"></a>00206 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_InstanceIdentifier ;} <a name="l00207"></a>00207 <a name="l00208"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#09e21365f397b183ded22c4a073f8030">00208</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>& operator++() <a name="l00209"></a>00209 { <a name="l00210"></a>00210 ++m_Iter; <a name="l00211"></a>00211 ++m_InstanceIdentifier; <a name="l00212"></a>00212 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00213"></a>00213 } <a name="l00214"></a>00214 <a name="l00215"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#78b11efa02bcaff74e2a63c5907aa6a8">00215</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>& operator--() <a name="l00216"></a>00216 { <a name="l00217"></a>00217 --m_Iter; <a name="l00218"></a>00218 --m_InstanceIdentifier; <a name="l00219"></a>00219 <span class="keywordflow">return</span> *this ; <a name="l00220"></a>00220 } <a name="l00221"></a>00221 <a name="l00222"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#95b37a4da81684933ed8a9a872c01f00">00222</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceitk_1_1ImageToImageFilterDetail.html#7bf30438b5d3bdc0eddbecd9b17baa3b">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> &it) <a name="l00223"></a>00223 { <a name="l00224"></a>00224 <span class="keywordflow">return</span> (m_Iter != it.m_Iter); <a name="l00225"></a>00225 } <a name="l00226"></a>00226 <a name="l00227"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#a83b1f2c72ed6108258d7f71ef935734">00227</a> <span class="keywordtype">bool</span> <a class="code" href="namespaceitk.html#e1c1b02c301187419478f5126c789a01">operator==</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> &it) <a name="l00228"></a>00228 { <a name="l00229"></a>00229 <span class="keywordflow">return</span> (m_Iter == it.m_Iter); <a name="l00230"></a>00230 } <a name="l00231"></a>00231 <a name="l00232"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#ce0eec0923d1be0cf5e8f105513f611a">00232</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>& operator = (<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> iter) <a name="l00233"></a>00233 { <a name="l00234"></a>00234 m_Iter = iter.m_Iter; <a name="l00235"></a>00235 m_InstanceIdentifier = iter.m_InstanceIdentifier ; <a name="l00236"></a>00236 <span class="keywordflow">return</span> *this ; <a name="l00237"></a>00237 } <a name="l00238"></a>00238 <a name="l00239"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#5b2e4e7adf856542779faf403ea6051b">00239</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>& operator = (<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> & iter) <a name="l00240"></a>00240 { <a name="l00241"></a>00241 m_Iter = iter.m_Iter; <a name="l00242"></a>00242 m_InstanceIdentifier = iter.m_InstanceIdentifier ; <a name="l00243"></a>00243 <span class="keywordflow">return</span> *this ; <a name="l00244"></a>00244 } <a name="l00245"></a>00245 <a name="l00246"></a>00246 <a name="l00247"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#b42d24201aced6cfcc20b4e78ba2aff1">00247</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> &iter) <a name="l00248"></a>00248 { <a name="l00249"></a>00249 m_Iter = iter.m_Iter; <a name="l00250"></a>00250 m_InstanceIdentifier = iter.m_InstanceIdentifier ; <a name="l00251"></a>00251 } <a name="l00252"></a>00252 <a name="l00253"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html#f31011011635e7b32cb0c6ec684cc026">00253</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> &iter) <a name="l00254"></a>00254 { <a name="l00255"></a>00255 m_Iter = iter.m_Iter; <a name="l00256"></a>00256 m_InstanceIdentifier = iter.m_InstanceIdentifier ; <a name="l00257"></a>00257 } <a name="l00258"></a>00258 <a name="l00259"></a>00259 <span class="keyword">private</span>: <a name="l00260"></a>00260 <span class="keyword">typename</span> InternalDataContainerType::const_iterator m_Iter ; <a name="l00261"></a>00261 InstanceIdentifier m_InstanceIdentifier ; <a name="l00262"></a>00262 } ; <a name="l00263"></a>00263 <a name="l00265"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#46e805ab8b32c22183d7827dd02cd6cc">00265</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> Begin() <a name="l00266"></a>00266 { <a name="l00267"></a>00267 <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> iter(m_InternalContainer.begin(), 0); <a name="l00268"></a>00268 <span class="keywordflow">return</span> iter; <a name="l00269"></a>00269 } <a name="l00271"></a>00271 <a name="l00273"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#a87238923f0edb9486fd90ec0b08a27d">00273</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> End() <a name="l00274"></a>00274 { <a name="l00275"></a>00275 <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1Iterator.html">Iterator</a> iter(m_InternalContainer.end(), m_InternalContainer.size()); <a name="l00276"></a>00276 <span class="keywordflow">return</span> iter; <a name="l00277"></a>00277 } <a name="l00279"></a>00279 <a name="l00281"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#db185547fd81eb9630bf38977373ad01">00281</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> Begin()<span class="keyword"> const</span> <a name="l00282"></a>00282 <span class="keyword"> </span>{ <a name="l00283"></a>00283 <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> iter(m_InternalContainer.begin(), 0); <a name="l00284"></a>00284 <span class="keywordflow">return</span> iter; <a name="l00285"></a>00285 } <a name="l00287"></a>00287 <a name="l00289"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#0c33de1b4f1c108b697580c1cbe95746">00289</a> <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> End()<span class="keyword"> const</span> <a name="l00290"></a>00290 <span class="keyword"> </span>{ <a name="l00291"></a>00291 <a class="code" href="classitk_1_1Statistics_1_1ListSample_1_1ConstIterator.html">ConstIterator</a> iter(m_InternalContainer.end(), m_InternalContainer.size()); <a name="l00292"></a>00292 <span class="keywordflow">return</span> iter; <a name="l00293"></a>00293 } <a name="l00295"></a>00295 <a name="l00296"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#a6a3b2d33ab6b31cd0dc614d8ce3408e">00296</a> <span class="keyword">virtual</span> MeasurementVectorSizeType GetMeasurementVectorSize()<span class="keyword"> const</span> <a name="l00297"></a>00297 <span class="keyword"> </span>{ <a name="l00298"></a>00298 <span class="keywordflow">if</span> ( !this->Superclass::GetMeasurementVectorSize() && this-><a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Size</a>()) <a name="l00299"></a>00299 { <span class="comment">// determined from the length of the first vector in the sample</span> <a name="l00300"></a>00300 <span class="comment">// at run time</span> <a name="l00301"></a>00301 <span class="keywordflow">return</span> <a class="code" href="classitk_1_1MeasurementVectorTraits.html#4868d37fef7fcc55678062887cf44afd">MeasurementVectorTraits::GetLength</a>(this->GetMeasurementVector(0)); <a name="l00302"></a>00302 } <a name="l00303"></a>00303 <span class="keywordflow">return</span> this->Superclass::GetMeasurementVectorSize(); <a name="l00304"></a>00304 } <a name="l00305"></a>00305 <a name="l00306"></a>00306 <span class="keyword">protected</span>: <a name="l00307"></a>00307 <a class="code" href="classitk_1_1Statistics_1_1ListSample.html" title="This class is the native implementation of the ListSampleBase.">ListSample</a>() ; <a name="l00308"></a><a class="code" href="classitk_1_1Statistics_1_1ListSample.html#d0e4f994b99166fbbe9856eac714ec08">00308</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1Statistics_1_1ListSample.html#d0e4f994b99166fbbe9856eac714ec08">~ListSample</a>() {} <a name="l00309"></a>00309 <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#920ae03048a5ad715d803ca2e92b52de">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="l00310"></a>00310 <a name="l00311"></a>00311 <a name="l00312"></a>00312 <span class="keyword">private</span>: <a name="l00313"></a>00313 <a class="code" href="classitk_1_1Statistics_1_1ListSample.html" title="This class is the native implementation of the ListSampleBase.">ListSample</a>(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&) ; <span class="comment">//purposely not implemented</span> <a name="l00314"></a>00314 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&) ; <span class="comment">//purposely not implemented</span> <a name="l00315"></a>00315 <a name="l00316"></a>00316 InternalDataContainerType m_InternalContainer ; <a name="l00317"></a>00317 <a name="l00318"></a>00318 }; <a name="l00319"></a>00319 <a name="l00320"></a>00320 } <span class="comment">// end of namespace Statistics </span> <a name="l00321"></a>00321 } <span class="comment">// end of namespace itk </span> <a name="l00322"></a>00322 <a name="l00323"></a>00323 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#include "itkListSample.txx"</span> <a name="l00325"></a>00325 <span class="preprocessor">#endif</span> <a name="l00326"></a>00326 <span class="preprocessor"></span> <a name="l00327"></a>00327 <span class="preprocessor">#endif</span> <a name="l00328"></a>00328 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 23:26:44 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>