Sophie

Sophie

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

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: itkIPLFileNameList.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_1ee1ddeef2dd172ba0b5030f5ec71db5.html">IO</a>
  </div>
<div class="contents">
<h1>itkIPLFileNameList.h</h1><a href="itkIPLFileNameList_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: itkIPLFileNameList.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-03-29 18:39:27 $</span>
<a name="l00007"></a>00007 <span class="comment">  Version:   $Revision: 1.11 $</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">  Portions of this code are covered under the VTK copyright.</span>
<a name="l00013"></a>00013 <span class="comment">  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even </span>
<a name="l00016"></a>00016 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR </span>
<a name="l00017"></a>00017 <span class="comment">     PURPOSE.  See the above copyright notices for more information.</span>
<a name="l00018"></a>00018 <span class="comment"></span>
<a name="l00019"></a>00019 <span class="comment">=========================================================================*/</span>
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __itkIPLFileNameList_h</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __itkIPLFileNameList_h</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkMacro_8h.html">itkMacro.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 
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;list&gt;</span>
<a name="l00030"></a><a class="code" href="itkIPLFileNameList_8h.html#9bb3f1c2476615961d9edc7937ea5b5c">00030</a> <span class="preprocessor">#define IPLSetMacro(name,type) \</span>
<a name="l00031"></a>00031 <span class="preprocessor">  virtual void Set##name (const type _arg) \</span>
<a name="l00032"></a>00032 <span class="preprocessor">  { \</span>
<a name="l00033"></a>00033 <span class="preprocessor">    if (this-&gt;m_##name != _arg) \</span>
<a name="l00034"></a>00034 <span class="preprocessor">      { \</span>
<a name="l00035"></a>00035 <span class="preprocessor">      this-&gt;m_##name = _arg; \</span>
<a name="l00036"></a>00036 <span class="preprocessor">      } \</span>
<a name="l00037"></a>00037 <span class="preprocessor">  } </span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 
<a name="l00041"></a><a class="code" href="itkIPLFileNameList_8h.html#038a0af541edc5e71bb0dce9e0ed2405">00041</a> <span class="preprocessor">#define IPLGetMacro(name,type) \</span>
<a name="l00042"></a>00042 <span class="preprocessor">  virtual type Get##name () \</span>
<a name="l00043"></a>00043 <span class="preprocessor">  { \</span>
<a name="l00044"></a>00044 <span class="preprocessor">    return this-&gt;m_##name; \</span>
<a name="l00045"></a>00045 <span class="preprocessor">  }</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 <span class="keyword">namespace </span>itk {
<a name="l00052"></a><a class="code" href="classitk_1_1IPLFileSortInfo.html">00052</a> <span class="keyword">class </span><a class="code" href="classitk_1_1IPLFileSortInfo.html">IPLFileSortInfo</a>
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="keyword">public</span>:
<a name="l00055"></a><a class="code" href="classitk_1_1IPLFileSortInfo.html#140907f6431d99dcd114e5b625dfd6f4">00055</a>   <a class="code" href="classitk_1_1IPLFileSortInfo.html#140907f6431d99dcd114e5b625dfd6f4">IPLFileSortInfo</a>()
<a name="l00056"></a>00056     {
<a name="l00057"></a>00057     m_SliceLocation = 0;
<a name="l00058"></a>00058     m_SliceOffset = 0;
<a name="l00059"></a>00059     m_EchoNumber = 0;
<a name="l00060"></a>00060     m_ImageNumber = 0;
<a name="l00061"></a>00061     m_Data = 0;
<a name="l00062"></a>00062     }
<a name="l00063"></a>00063 
<a name="l00064"></a><a class="code" href="classitk_1_1IPLFileSortInfo.html#18df8cdce1b73823280d62d876d34de5">00064</a>   <a class="code" href="classitk_1_1IPLFileSortInfo.html#140907f6431d99dcd114e5b625dfd6f4">IPLFileSortInfo</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keyword">const</span> filename,<span class="keywordtype">float</span> sliceLocation,
<a name="l00065"></a>00065                   <span class="keywordtype">int</span> sliceOffset,<span class="keywordtype">int</span> echoNumber,<span class="keywordtype">int</span> imageNumber,
<a name="l00066"></a>00066                   <span class="keywordtype">void</span> *data = 0)
<a name="l00067"></a>00067     {
<a name="l00068"></a>00068     m_ImageFileName = filename;
<a name="l00069"></a>00069     m_SliceLocation = sliceLocation;
<a name="l00070"></a>00070     m_SliceOffset = sliceOffset;
<a name="l00071"></a>00071     m_EchoNumber = echoNumber;
<a name="l00072"></a>00072     m_ImageNumber = imageNumber;
<a name="l00073"></a>00073     m_Data = data;
<a name="l00074"></a>00074     }
<a name="l00075"></a><a class="code" href="classitk_1_1IPLFileSortInfo.html#978f8858cf517eccf9213b4911aa9781">00075</a>   <span class="keyword">virtual</span> <a class="code" href="classitk_1_1IPLFileSortInfo.html#978f8858cf517eccf9213b4911aa9781">~IPLFileSortInfo</a>() {}
<a name="l00076"></a>00076 
<a name="l00077"></a>00077   <a class="code" href="classitk_1_1IPLFileSortInfo.html#cd47ee0226d18260f3fa67d720a116cf">IPLSetMacro</a>(ImageFileName,std::string );
<a name="l00078"></a>00078   <a class="code" href="classitk_1_1IPLFileSortInfo.html#7ded14e1acee0c5eade5d5baecdf5caa">IPLGetMacro</a>(ImageFileName,std::string );
<a name="l00079"></a>00079   <a class="code" href="classitk_1_1IPLFileSortInfo.html#cd47ee0226d18260f3fa67d720a116cf">IPLSetMacro</a>(SliceLocation,<span class="keywordtype">float</span> );
<a name="l00080"></a>00080   <a class="code" href="classitk_1_1IPLFileSortInfo.html#7ded14e1acee0c5eade5d5baecdf5caa">IPLGetMacro</a>(SliceLocation,<span class="keywordtype">float</span> );
<a name="l00081"></a>00081   <a class="code" href="classitk_1_1IPLFileSortInfo.html#cd47ee0226d18260f3fa67d720a116cf">IPLSetMacro</a>(SliceOffset,<span class="keywordtype">int</span> );
<a name="l00082"></a>00082   <a class="code" href="classitk_1_1IPLFileSortInfo.html#7ded14e1acee0c5eade5d5baecdf5caa">IPLGetMacro</a>(SliceOffset,<span class="keywordtype">int</span> );
<a name="l00083"></a>00083   <a class="code" href="classitk_1_1IPLFileSortInfo.html#cd47ee0226d18260f3fa67d720a116cf">IPLSetMacro</a>(EchoNumber,<span class="keywordtype">int</span> );
<a name="l00084"></a>00084   <a class="code" href="classitk_1_1IPLFileSortInfo.html#7ded14e1acee0c5eade5d5baecdf5caa">IPLGetMacro</a>(EchoNumber,<span class="keywordtype">int</span> );
<a name="l00085"></a>00085   <a class="code" href="classitk_1_1IPLFileSortInfo.html#cd47ee0226d18260f3fa67d720a116cf">IPLSetMacro</a>(ImageNumber,<span class="keywordtype">int</span> );
<a name="l00086"></a>00086   <a class="code" href="classitk_1_1IPLFileSortInfo.html#7ded14e1acee0c5eade5d5baecdf5caa">IPLGetMacro</a>(ImageNumber,<span class="keywordtype">int</span> );
<a name="l00087"></a>00087   <a class="code" href="classitk_1_1IPLFileSortInfo.html#cd47ee0226d18260f3fa67d720a116cf">IPLSetMacro</a>(Data,<span class="keywordtype">void</span> *);
<a name="l00088"></a>00088   <a class="code" href="classitk_1_1IPLFileSortInfo.html#7ded14e1acee0c5eade5d5baecdf5caa">IPLGetMacro</a>(Data,<span class="keyword">const</span> <span class="keywordtype">void</span> *);
<a name="l00089"></a>00089 <span class="keyword">private</span>:
<a name="l00090"></a>00090   std::string m_ImageFileName;
<a name="l00091"></a>00091   <span class="keywordtype">float</span>       m_SliceLocation;
<a name="l00092"></a>00092   <span class="keywordtype">int</span>         m_SliceOffset;
<a name="l00093"></a>00093   <span class="keywordtype">int</span>         m_EchoNumber;
<a name="l00094"></a>00094   <span class="keywordtype">int</span>         m_ImageNumber;
<a name="l00095"></a>00095   <span class="keyword">const</span> <span class="keywordtype">void</span> *m_Data;
<a name="l00096"></a>00096 };
<a name="l00097"></a>00097 
<a name="l00101"></a><a class="code" href="classitk_1_1IPLFileNameList.html">00101</a> <span class="keyword">class </span><a class="code" href="classitk_1_1IPLFileNameList.html" title="-- stores filename+info to be enumerated for IPLCommonImageIO">IPLFileNameList</a>
<a name="l00102"></a>00102 {
<a name="l00103"></a>00103 <span class="keyword">public</span>:
<a name="l00104"></a><a class="code" href="classitk_1_1IPLFileNameList.html#1a85454e5346d0e3c25ab7f96b010e90">00104</a>   <span class="keyword">typedef</span> std::vector&lt;IPLFileSortInfo *&gt; <a class="code" href="classitk_1_1IPLFileNameList.html#1a85454e5346d0e3c25ab7f96b010e90">ListType</a>;
<a name="l00105"></a><a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">00105</a>   <span class="keyword">typedef</span> ListType::iterator             <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a>;
<a name="l00106"></a><a class="code" href="classitk_1_1IPLFileNameList.html#6143d57823fb76793bcb438360701e02">00106</a>   <span class="keyword">typedef</span> <span class="keywordtype">size_t</span>                         <a class="code" href="classitk_1_1IPLFileNameList.html#6143d57823fb76793bcb438360701e02">ListSizeType</a>;
<a name="l00107"></a>00107     
<a name="l00108"></a>00108   <span class="keyword">enum</span>
<a name="l00109"></a>00109     {
<a name="l00110"></a><a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151aa4f76b69fa8f57859fba32ccf57bc0cf">00110</a>     <a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151aa4f76b69fa8f57859fba32ccf57bc0cf">SortGlobalAscend</a> = 0,
<a name="l00111"></a><a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151a0d510147004cb07172c46d58af1923b6">00111</a>     <a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151a0d510147004cb07172c46d58af1923b6">SortGlobalDescend</a> = 1,
<a name="l00112"></a><a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151a9465d35bc9965645418408e05415466a">00112</a>     <a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151a9465d35bc9965645418408e05415466a">SortByNameAscend</a> = 2,
<a name="l00113"></a><a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151aaf48df1cde569690a1969f063c96e7d6">00113</a>     <a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151aaf48df1cde569690a1969f063c96e7d6">SortByNameDescend</a> = 3
<a name="l00114"></a>00114     };
<a name="l00115"></a>00115     
<a name="l00116"></a><a class="code" href="classitk_1_1IPLFileNameList.html#c0f85d2e33bdaf2a34df4e9d5b68a732">00116</a>   <a class="code" href="classitk_1_1IPLFileNameList.html#c0f85d2e33bdaf2a34df4e9d5b68a732">IPLFileNameList</a>() 
<a name="l00117"></a>00117     {
<a name="l00118"></a>00118     m_XDim = 0;
<a name="l00119"></a>00119     m_YDim = 0;
<a name="l00124"></a>00124     m_SortOrder = <a class="code" href="classitk_1_1IPLFileNameList.html#9bee00d20d8ce42e01c58303b21d151aa4f76b69fa8f57859fba32ccf57bc0cf">SortGlobalAscend</a>; 
<a name="l00125"></a>00125     }
<a name="l00126"></a>00126 
<a name="l00127"></a><a class="code" href="classitk_1_1IPLFileNameList.html#848e4a6ecc022caaddc21edc03f96a00">00127</a>   <span class="keyword">virtual</span> <a class="code" href="classitk_1_1IPLFileNameList.html#848e4a6ecc022caaddc21edc03f96a00">~IPLFileNameList</a>()
<a name="l00128"></a>00128     {
<a name="l00129"></a>00129     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> it = <a class="code" href="classitk_1_1IPLFileNameList.html#4dab95748e6b7f95ca6bfb6f74ebe5ae">begin</a>();
<a name="l00130"></a>00130     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> itend = <a class="code" href="classitk_1_1IPLFileNameList.html#eaaee3281064f426eaeb222dc5210dbd">end</a>();
<a name="l00131"></a>00131     <span class="keywordflow">while</span>(it != itend)
<a name="l00132"></a>00132       {
<a name="l00133"></a>00133       <span class="keyword">delete</span> (*it);
<a name="l00134"></a>00134       it++;
<a name="l00135"></a>00135       }
<a name="l00136"></a>00136     }
<a name="l00137"></a>00137 
<a name="l00138"></a><a class="code" href="classitk_1_1IPLFileNameList.html#4dab95748e6b7f95ca6bfb6f74ebe5ae">00138</a>   <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> <a class="code" href="classitk_1_1IPLFileNameList.html#4dab95748e6b7f95ca6bfb6f74ebe5ae">begin</a>()
<a name="l00139"></a>00139     {
<a name="l00140"></a>00140     <span class="keywordflow">return</span> m_List.begin();
<a name="l00141"></a>00141     }
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="classitk_1_1IPLFileNameList.html#eaaee3281064f426eaeb222dc5210dbd">00143</a>   <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> <a class="code" href="classitk_1_1IPLFileNameList.html#eaaee3281064f426eaeb222dc5210dbd">end</a>()
<a name="l00144"></a>00144     {
<a name="l00145"></a>00145     <span class="keywordflow">return</span> m_List.end();
<a name="l00146"></a>00146     }
<a name="l00147"></a>00147 
<a name="l00148"></a><a class="code" href="classitk_1_1IPLFileNameList.html#a48400d7d46827596378ddd5b23f74a7">00148</a>   <a class="code" href="classitk_1_1IPLFileSortInfo.html">IPLFileSortInfo</a> *<a class="code" href="classitk_1_1IPLFileNameList.html#a48400d7d46827596378ddd5b23f74a7">operator[]</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> __n)
<a name="l00149"></a>00149     {
<a name="l00150"></a>00150     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> it = <a class="code" href="classitk_1_1IPLFileNameList.html#4dab95748e6b7f95ca6bfb6f74ebe5ae">begin</a>();
<a name="l00151"></a>00151     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> itend= <a class="code" href="classitk_1_1IPLFileNameList.html#eaaee3281064f426eaeb222dc5210dbd">end</a>();
<a name="l00152"></a>00152     <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; it != itend &amp;&amp; i != __n; it++, i++)
<a name="l00153"></a>00153       {
<a name="l00154"></a>00154       }
<a name="l00155"></a>00155     <span class="keywordflow">if</span>(it == itend)
<a name="l00156"></a>00156       {
<a name="l00157"></a>00157       <span class="keywordflow">return</span> 0;
<a name="l00158"></a>00158       }
<a name="l00159"></a>00159     <span class="keywordflow">return</span> *it;
<a name="l00160"></a>00160     }
<a name="l00161"></a>00161 
<a name="l00162"></a><a class="code" href="classitk_1_1IPLFileNameList.html#776dea29464ce2f5373db006690e67e4">00162</a>   <a class="code" href="classitk_1_1IPLFileNameList.html#6143d57823fb76793bcb438360701e02">ListSizeType</a> <a class="code" href="classitk_1_1IPLFileNameList.html#776dea29464ce2f5373db006690e67e4">NumFiles</a>()<span class="keyword"> const</span>
<a name="l00163"></a>00163 <span class="keyword">    </span>{
<a name="l00164"></a>00164     <span class="keywordflow">return</span> m_List.size();
<a name="l00165"></a>00165     }
<a name="l00166"></a>00166 
<a name="l00167"></a><a class="code" href="classitk_1_1IPLFileNameList.html#b468164e7fe8d2f1b3142da1131add2c">00167</a>   <span class="keywordtype">bool</span> <a class="code" href="classitk_1_1IPLFileNameList.html#b468164e7fe8d2f1b3142da1131add2c">AddElementToList</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> *<span class="keyword">const</span> filename, 
<a name="l00168"></a>00168                         <span class="keyword">const</span> <span class="keywordtype">float</span> sliceLocation, 
<a name="l00169"></a>00169                         <span class="keyword">const</span> <span class="keywordtype">int</span> offset, 
<a name="l00170"></a>00170                         <span class="keyword">const</span> <span class="keywordtype">int</span> XDim, 
<a name="l00171"></a>00171                         <span class="keyword">const</span> <span class="keywordtype">int</span> YDim, 
<a name="l00172"></a>00172                         <span class="keyword">const</span> <span class="keywordtype">int</span> imageNumber, 
<a name="l00173"></a>00173                         <span class="keyword">const</span> <span class="keywordtype">int</span> Key1,
<a name="l00174"></a>00174                         <span class="keyword">const</span> <span class="keywordtype">int</span> Key2)
<a name="l00175"></a>00175     {
<a name="l00176"></a>00176     <span class="keywordflow">if</span>(m_List.empty())
<a name="l00177"></a>00177       {
<a name="l00178"></a>00178       m_XDim = XDim;
<a name="l00179"></a>00179       m_YDim = YDim;
<a name="l00180"></a>00180       m_Key1 = Key1;
<a name="l00181"></a>00181       m_Key2 = Key2;
<a name="l00182"></a>00182       }
<a name="l00183"></a>00183     <span class="keywordflow">else</span> <span class="keywordflow">if</span>(XDim != m_XDim || YDim != YDim)
<a name="l00184"></a>00184       {
<a name="l00185"></a>00185       <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00186"></a>00186       }
<a name="l00187"></a>00187     <span class="keywordflow">else</span> <span class="keywordflow">if</span>(Key1 != m_Key1 || Key2 != m_Key2)
<a name="l00188"></a>00188       {
<a name="l00189"></a>00189       <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00190"></a>00190       }
<a name="l00191"></a>00191     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> it = <a class="code" href="classitk_1_1IPLFileNameList.html#4dab95748e6b7f95ca6bfb6f74ebe5ae">begin</a>();
<a name="l00192"></a>00192     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> itend = <a class="code" href="classitk_1_1IPLFileNameList.html#eaaee3281064f426eaeb222dc5210dbd">end</a>();
<a name="l00193"></a>00193     <span class="keywordflow">while</span>(it != itend)
<a name="l00194"></a>00194       {
<a name="l00195"></a>00195       <span class="keywordflow">if</span>(std::string(filename) == (*it)-&gt;GetImageFileName())
<a name="l00196"></a>00196         {
<a name="l00197"></a>00197         <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00198"></a>00198         }
<a name="l00199"></a>00199       it++;
<a name="l00200"></a>00200       }
<a name="l00201"></a>00201     m_List.push_back(<span class="keyword">new</span> <a class="code" href="classitk_1_1IPLFileSortInfo.html">IPLFileSortInfo</a>(filename,
<a name="l00202"></a>00202                                          sliceLocation,
<a name="l00203"></a>00203                                          offset,
<a name="l00204"></a>00204                                          0, <span class="comment">// echo number</span>
<a name="l00205"></a>00205                                          imageNumber));
<a name="l00206"></a>00206     <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00207"></a>00207     }
<a name="l00208"></a>00208 
<a name="l00209"></a><a class="code" href="classitk_1_1IPLFileNameList.html#2f44118e04612c2ec1b9b18bc341a26b">00209</a>   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1IPLFileNameList.html#2f44118e04612c2ec1b9b18bc341a26b">RemoveElementFromList</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> ElementToRemove)
<a name="l00210"></a>00210     {
<a name="l00211"></a>00211     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> it = m_List.begin();
<a name="l00212"></a>00212     <a class="code" href="classitk_1_1IPLFileNameList.html#2d473bb0adf76aff6d26bbfb4687b68b">IteratorType</a> itend = m_List.end();
<a name="l00213"></a>00213     <span class="keywordtype">int</span> i = 0;
<a name="l00214"></a>00214     <span class="keywordflow">for</span>(i = 0; it != itend; i++, it++)
<a name="l00215"></a>00215       {
<a name="l00216"></a>00216       <span class="keywordflow">if</span>(i != ElementToRemove)
<a name="l00217"></a>00217         {
<a name="l00218"></a>00218         <span class="keywordflow">break</span>;
<a name="l00219"></a>00219         }
<a name="l00220"></a>00220       }
<a name="l00221"></a>00221     <span class="keywordflow">if</span>(it == itend)
<a name="l00222"></a>00222       {
<a name="l00223"></a>00223       <span class="keywordflow">return</span>;
<a name="l00224"></a>00224       }
<a name="l00225"></a>00225     m_List.erase(it);
<a name="l00226"></a>00226     }
<a name="l00227"></a>00227   
<a name="l00228"></a>00228   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1IPLFileNameList.html#7bb4d887d9d54005bf47ec994a10da1e">sortImageList</a>();
<a name="l00229"></a>00229   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1IPLFileNameList.html#d4794c1604a5e7a5d2b698fb5c0d3cf0">sortImageListAscend</a>();
<a name="l00230"></a>00230   <span class="keywordtype">void</span> <a class="code" href="classitk_1_1IPLFileNameList.html#bf1117442329083b5f0eae49929b00d6">sortImageListDescend</a>();
<a name="l00231"></a>00231 
<a name="l00232"></a><a class="code" href="classitk_1_1IPLFileNameList.html#8f9e7e3356327d08a972f36d9cc59e27">00232</a>   <a class="code" href="classitk_1_1IPLFileNameList.html#6143d57823fb76793bcb438360701e02">ListSizeType</a> <a class="code" href="classitk_1_1IPLFileNameList.html#8f9e7e3356327d08a972f36d9cc59e27">GetnumImageInfoStructs</a>()<span class="keyword"> const</span>
<a name="l00233"></a>00233 <span class="keyword">    </span>{
<a name="l00234"></a>00234     <span class="keywordflow">return</span> m_List.size();
<a name="l00235"></a>00235     }
<a name="l00236"></a>00236 
<a name="l00237"></a>00237   <a class="code" href="classitk_1_1IPLFileNameList.html#d33196653a2ef0f5f0e4f9c953d4415e">IPLSetMacro</a>(XDim,<span class="keywordtype">int</span> );
<a name="l00238"></a>00238   <a class="code" href="classitk_1_1IPLFileNameList.html#24d0d1916e943360630b2e8bdffc4b61">IPLGetMacro</a>(XDim,<span class="keywordtype">int</span> );
<a name="l00239"></a>00239   <a class="code" href="classitk_1_1IPLFileNameList.html#d33196653a2ef0f5f0e4f9c953d4415e">IPLSetMacro</a>(YDim,<span class="keywordtype">int</span> );
<a name="l00240"></a>00240   <a class="code" href="classitk_1_1IPLFileNameList.html#24d0d1916e943360630b2e8bdffc4b61">IPLGetMacro</a>(YDim,<span class="keywordtype">int</span> );
<a name="l00241"></a>00241   <a class="code" href="classitk_1_1IPLFileNameList.html#d33196653a2ef0f5f0e4f9c953d4415e">IPLSetMacro</a>(Key1,<span class="keywordtype">int</span> );
<a name="l00242"></a>00242   <a class="code" href="classitk_1_1IPLFileNameList.html#24d0d1916e943360630b2e8bdffc4b61">IPLGetMacro</a>(Key1,<span class="keywordtype">int</span> );
<a name="l00243"></a>00243   <a class="code" href="classitk_1_1IPLFileNameList.html#d33196653a2ef0f5f0e4f9c953d4415e">IPLSetMacro</a>(Key2,<span class="keywordtype">int</span> );
<a name="l00244"></a>00244   <a class="code" href="classitk_1_1IPLFileNameList.html#24d0d1916e943360630b2e8bdffc4b61">IPLGetMacro</a>(Key2,<span class="keywordtype">int</span> );
<a name="l00245"></a>00245   <a class="code" href="classitk_1_1IPLFileNameList.html#d33196653a2ef0f5f0e4f9c953d4415e">IPLSetMacro</a>(SortOrder,<span class="keywordtype">int</span> );
<a name="l00246"></a>00246 <span class="keyword">private</span>:
<a name="l00247"></a>00247   <a class="code" href="classitk_1_1IPLFileNameList.html#1a85454e5346d0e3c25ab7f96b010e90">ListType</a> m_List;
<a name="l00248"></a>00248   <span class="keywordtype">int</span> m_XDim;
<a name="l00249"></a>00249   <span class="keywordtype">int</span> m_YDim;
<a name="l00255"></a>00255   <span class="keywordtype">int</span> m_SortOrder;
<a name="l00256"></a>00256 };
<a name="l00257"></a>00257 
<a name="l00258"></a>00258 }
<a name="l00259"></a>00259 <span class="preprocessor">#endif                          </span><span class="comment">/* __itkIPLFileNameList_h */</span>
<a name="l00260"></a>00260 
</pre></div></div>
<hr><address><small>
Generated at Thu May 7 23:19:24 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>