Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > d5e74628f0e673bb8680aebce32b2c04 > files > 16167

itk-doc-3.12.0-1mdv2010.0.i586.rpm

<!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: itkImageToListGenerator.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>&nbsp;&nbsp; 
<a href="modules.html" class="qindex">Groups</a>&nbsp;&nbsp;
<a href="namespaces.html" class="qindex">Namespace List</a>&nbsp;&nbsp;
<a href="hierarchy.html" class="qindex">Class Hierarchy</a>&nbsp;&nbsp;
<a href="classes.html" class="qindex">Alphabetical List</a>&nbsp;&nbsp;
<a href="annotated.html" class="qindex">Compound List</a>&nbsp;&nbsp; 
<a href="files.html" class="qindex">File
List</a>&nbsp;&nbsp; 
<a href="namespacemembers.html" class="qindex">Namespace Members</a>&nbsp;&nbsp; 
<a href="functions.html" class="qindex">Compound Members</a>&nbsp;&nbsp; 
<a href="globals.html" class="qindex">File Members</a>&nbsp;&nbsp;
<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>&nbsp;&raquo&nbsp;<a class="el" href="dir_2c33022d19e8077162952ea9ed57656d.html">Numerics</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_e82fe55e9fab4124d6625d716e091a5f.html">Statistics</a>
  </div>
<div class="contents">
<h1>itkImageToListGenerator.h</h1><a href="itkImageToListGenerator_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 &amp; Registration Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: itkImageToListGenerator.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-04-25 22:25:16 $</span>
<a name="l00007"></a>00007 <span class="comment">  Version:   $Revision: 1.3 $</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 __itkImageToListGenerator_h</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkImageToListGenerator_h</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="itkListSample_8h.html">itkListSample.h</a>"</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include "itkPixelTraits.h"</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkProcessObject_8h.html">itkProcessObject.h</a>"</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkDataObject_8h.html">itkDataObject.h</a>"</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkDataObjectDecorator_8h.html">itkDataObjectDecorator.h</a>"</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkFixedArray_8h.html">itkFixedArray.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="l00053"></a>00053 <span class="keyword">template</span> &lt; <span class="keyword">class</span> TImage, <span class="keyword">class</span> TMaskImage = TImage &gt; 
<a name="l00054"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html">00054</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_1ImageToListGenerator.html" title="The class takes an image as input and generates a list sample as output.">ImageToListGenerator</a> :
<a name="l00055"></a>00055   <span class="keyword">public</span> <a class="code" href="classitk_1_1ProcessObject.html" title="ProcessObject is the base class for all process objects (source, filters, mappers)...">ProcessObject</a>
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 <span class="keyword">public</span>:
<a name="l00059"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#53004a2ace7e8c8fc22e6801586f4757">00059</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html" title="The class takes an image as input and generates a list sample as output.">ImageToListGenerator</a>        <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Self</a>;
<a name="l00060"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#bc0a78d903f7b638370ff96996022d38">00060</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1ProcessObject.html" title="ProcessObject is the base class for all process objects (source, filters, mappers)...">ProcessObject</a>               <a class="code" href="classitk_1_1LightObject.html" title="Light weight base class for most itk classes.">Superclass</a>;
<a name="l00061"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#d064856a2c8f52ab3054282ded25c9d3">00061</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer&lt; Self &gt;</a>        <a class="code" href="classitk_1_1SmartPointer.html">Pointer</a>;
<a name="l00062"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#07ae40b49ba0c6fad51287dce4644c0e">00062</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">SmartPointer&lt;const Self&gt;</a>    <a class="code" href="classitk_1_1SmartPointer.html">ConstPointer</a>;
<a name="l00063"></a>00063 
<a name="l00065"></a>00065   <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html" title="The class takes an image as input and generates a list sample as output.">ImageToListGenerator</a>, <a class="code" href="classitk_1_1ProcessObject.html" title="ProcessObject is the base class for all process objects (source, filters, mappers)...">ProcessObject</a>);
<a name="l00066"></a>00066 
<a name="l00068"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#14723f5e6fef290711537875f783e0ce">00068</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="l00069"></a>00069 
<a name="l00071"></a>00071   <span class="keyword">typedef</span> TImage                           ImageType;
<a name="l00072"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#42c4b4b344b2be0673020c2b73e8561a">00072</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">ImageType::Pointer</a>      ImagePointer;
<a name="l00073"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#75520485a28077108b3a4c48d19267f4">00073</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#68fafcc6909430ccd70cbc4aeee0107c">ImageType::ConstPointer</a> ImageConstPointer;
<a name="l00074"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#935e5aec1e54b623026de4460f94ca6b">00074</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> ImageType::PixelType    PixelType;
<a name="l00075"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#bedc2824bd559be1adcec2ca742e2a6e">00075</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1FixedArray.html" title="Simulate a standard C array with copy semnatics.">FixedArray&lt; PixelType, 1 &gt;</a>       <a class="code" href="classitk_1_1FixedArray.html" title="Simulate a standard C array with copy semnatics.">MeasurementVectorType</a>;
<a name="l00076"></a>00076 
<a name="l00078"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#81d02e59f68346aa07ecaab77e861698">00078</a>   <span class="keyword">typedef</span> TMaskImage                           MaskImageType;
<a name="l00079"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#205027b89eb708c8aaf80a7f4893fd0c">00079</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#539cce1a3282ba59952dedcbf9cdb23f">MaskImageType::Pointer</a>      MaskImagePointer;
<a name="l00080"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#33342d878956c9f8283efc3f4156318a">00080</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="itkFEMMacro_8h.html#68fafcc6909430ccd70cbc4aeee0107c">MaskImageType::ConstPointer</a> MaskImageConstPointer;
<a name="l00081"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#a895793204c00a1e22de292ff2888725">00081</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> MaskImageType::PixelType    MaskPixelType;
<a name="l00082"></a>00082 
<a name="l00084"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#076761e8435cbf5f3d3732145bf2c732">00084</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&lt; MeasurementVectorType &gt;</a>  <a class="code" href="classitk_1_1Statistics_1_1ListSample.html" title="This class is the native implementation of the ListSampleBase.">ListSampleType</a>;
<a name="l00085"></a>00085 
<a name="l00088"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#f5d40abf7685d2fd4e3b254dd186552f">00088</a>   <span class="keyword">typedef</span> PixelTraits&lt; typename ImageType::PixelType &gt; PixelTraitsType;
<a name="l00089"></a>00089   <span class="keyword">typedef</span> <span class="keyword">typename</span> ListSampleType::MeasurementVectorSizeType 
<a name="l00090"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#8ef15b8b4fb84b8048545d7dde54962b">00090</a>                                      MeasurementVectorSizeType;
<a name="l00091"></a>00091 
<a name="l00092"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#9c2b28677e9c13a497035c72ca9ebe58">00092</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1SmartPointer.html">DataObject::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">DataObjectPointer</a>;
<a name="l00093"></a>00093 
<a name="l00096"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#3b05deed11ddf0585bba94f8e12a0ae9">00096</a>   <span class="keyword">typedef</span> <a class="code" href="classitk_1_1DataObjectDecorator.html" title="Decorates any subclass of itkObject with a DataObject API.">DataObjectDecorator&lt; ListSampleType &gt;</a>  <a class="code" href="classitk_1_1DataObjectDecorator.html" title="Decorates any subclass of itkObject with a DataObject API.">ListSampleOutputType</a>;
<a name="l00097"></a>00097 
<a name="l00099"></a>00099   <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(MeasurementVectorSize, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>,
<a name="l00100"></a>00100                       PixelTraitsType::Dimension);
<a name="l00101"></a>00101 
<a name="l00103"></a>00103   <span class="keyword">virtual</span> <a class="code" href="classitk_1_1SmartPointer.html">DataObjectPointer</a> MakeOutput(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx);
<a name="l00104"></a>00104 
<a name="l00105"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#cd902b78e05d4d862250901c088e7664">00105</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetMeasurementVectorSize( <span class="keyword">const</span> MeasurementVectorSizeType s )
<a name="l00106"></a>00106     {
<a name="l00107"></a>00107     <span class="comment">// Measurement vector size for this class is fixed as the pixel's </span>
<a name="l00108"></a>00108     <span class="comment">// dimension. This method should throw an exception if the user tries to </span>
<a name="l00109"></a>00109     <span class="comment">// set the dimension to a different value. </span>
<a name="l00110"></a>00110     <span class="keywordflow">if</span>( s != MeasurementVectorSize )
<a name="l00111"></a>00111       {
<a name="l00112"></a>00112       <a class="code" href="itkMacro_8h.html#c51de1a715471e7fd0f2e481a70fa1f8">itkExceptionMacro</a>(
<a name="l00113"></a>00113         &lt;&lt; <span class="stringliteral">"Measurement vector size for the image adaptor obtained"</span>
<a name="l00114"></a>00114         &lt;&lt; <span class="stringliteral">" from the pixel dimension is: "</span>
<a name="l00115"></a>00115         &lt;&lt; MeasurementVectorSize &lt;&lt; <span class="stringliteral">" but you "</span>
<a name="l00116"></a>00116         &lt;&lt; <span class="stringliteral">"are setting it to "</span> &lt;&lt; s);
<a name="l00117"></a>00117       }
<a name="l00118"></a>00118     }
<a name="l00119"></a>00119 
<a name="l00120"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#76ccfab6619e305b7b650bc204ba95cc">00120</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> GetMeasurementVectorSize()<span class="keyword"> const </span>
<a name="l00121"></a>00121 <span class="keyword">    </span>{
<a name="l00122"></a>00122     <span class="keywordflow">return</span> MeasurementVectorSize;
<a name="l00123"></a>00123     } 
<a name="l00124"></a>00124 
<a name="l00126"></a>00126   <span class="keywordtype">void</span> SetInput( <span class="keyword">const</span> ImageType* image );
<a name="l00127"></a>00127   <span class="keyword">const</span> ImageType* GetInput() <span class="keyword">const</span>;
<a name="l00129"></a>00129 
<a name="l00131"></a>00131   <span class="keywordtype">void</span> SetMaskImage( <span class="keyword">const</span> MaskImageType* image );
<a name="l00132"></a>00132   <span class="keyword">const</span> MaskImageType* GetMaskImage() <span class="keyword">const</span>;
<a name="l00134"></a>00134 
<a name="l00138"></a>00138   <span class="keyword">const</span> ListSampleType * GetListSample() <span class="keyword">const</span>;
<a name="l00139"></a>00139 
<a name="l00144"></a>00144   <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>( MaskValue, MaskPixelType );
<a name="l00145"></a>00145   <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>( MaskValue, MaskPixelType );
<a name="l00147"></a>00147 
<a name="l00149"></a>00149   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#f75a5945cdd8315676941024a0b8c1e9">GenerateData</a>();
<a name="l00150"></a>00150 
<a name="l00153"></a>00153   <span class="keyword">virtual</span> <span class="keywordtype">void</span> GenerateInputRequestedRegion()
<a name="l00154"></a>00154     throw(<a class="code" href="classitk_1_1InvalidRequestedRegionError.html">InvalidRequestedRegionError</a>);
<a name="l00155"></a>00155 
<a name="l00156"></a>00156   virtual <span class="keywordtype">void</span> GenerateOutputInformation();
<a name="l00157"></a>00157 
<a name="l00158"></a>00158 protected:
<a name="l00159"></a>00159   <a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html" title="The class takes an image as input and generates a list sample as output.">ImageToListGenerator</a>();
<a name="l00160"></a><a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html#eeadd15694646888120e0d43bcb3b65e">00160</a>   virtual ~ImageToListGenerator() {}
<a name="l00161"></a>00161   <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#920ae03048a5ad715d803ca2e92b52de">PrintSelf</a>(std::ostream&amp; 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="l00162"></a>00162 
<a name="l00163"></a>00163 <span class="keyword">private</span>:
<a name="l00164"></a>00164   <a class="code" href="classitk_1_1Statistics_1_1ImageToListGenerator.html" title="The class takes an image as input and generates a list sample as output.">ImageToListGenerator</a>(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&amp;); <span class="comment">//purposely not implemented</span>
<a name="l00165"></a>00165   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&amp;); <span class="comment">//purposely not implemented</span>
<a name="l00166"></a>00166 
<a name="l00167"></a>00167   MaskPixelType m_MaskValue;
<a name="l00168"></a>00168 
<a name="l00169"></a>00169 }; <span class="comment">// end of class ImageToListGenerator</span>
<a name="l00170"></a>00170 
<a name="l00171"></a>00171 } <span class="comment">// end of namespace Statistics</span>
<a name="l00172"></a>00172 } <span class="comment">// end of namespace itk</span>
<a name="l00173"></a>00173 
<a name="l00174"></a>00174 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span>
<a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">#include "itkImageToListGenerator.txx"</span>
<a name="l00176"></a>00176 <span class="preprocessor">#endif</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span>
<a name="l00178"></a>00178 <span class="preprocessor">#endif</span>
<a name="l00179"></a>00179 <span class="preprocessor"></span>
</pre></div></div>
<hr><address><small>
Generated at Thu May 7 23:14:49 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>,
 &copy;&nbsp;1997-2000</small></address>
</body>
</html>