<!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: itkPathIterator.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_ea7fc529ede9a38b0438cf13831ae873.html">Common</a> </div> <div class="contents"> <h1>itkPathIterator.h</h1><a href="itkPathIterator_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: itkPathIterator.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2009-02-19 19:41:23 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.7 $</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 __itkPathIterator_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkPathIterator_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="itkIndex_8h.html">itkIndex.h</a>"</span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkImage_8h.html">itkImage.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkPath_8h.html">itkPath.h</a>"</span> <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkPathConstIterator_8h.html">itkPathConstIterator.h</a>"</span> <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="keyword">namespace </span>itk <a name="l00026"></a>00026 { <a name="l00027"></a>00027 <a name="l00068"></a>00068 <span class="keyword">template</span><<span class="keyword">class</span> TImage, <span class="keyword">class</span> TPath> <a name="l00069"></a><a class="code" href="classitk_1_1PathIterator.html">00069</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1PathIterator.html" title="PathIterator iterates (traces) over a path through an image.">PathIterator</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1PathConstIterator.html" title="PathConstIterator iterates (traces) over a path through an image.">PathConstIterator</a><TImage, TPath> <a name="l00070"></a>00070 { <a name="l00071"></a>00071 <span class="keyword">public</span>: <a name="l00072"></a>00072 <a name="l00074"></a><a class="code" href="classitk_1_1PathIterator.html#264c07011e40ae372a1bed0b321193be">00074</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1PathIterator.html" title="PathIterator iterates (traces) over a path through an image.">PathIterator</a> <a class="code" href="classitk_1_1PathIterator.html" title="PathIterator iterates (traces) over a path through an image.">Self</a>; <a name="l00075"></a>00075 <a name="l00080"></a>00080 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(ImageIteratorDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a name="l00081"></a>00081 TImage::ImageDimension); <a name="l00082"></a>00082 <a name="l00084"></a><a class="code" href="classitk_1_1PathIterator.html#4de19da264cc5c4ba31a0dc4f6472950">00084</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1PathConstIterator.html">PathConstIterator<TImage,TPath></a> <a class="code" href="classitk_1_1PathConstIterator.html">Superclass</a>; <a name="l00085"></a>00085 <a name="l00087"></a><a class="code" href="classitk_1_1PathIterator.html#0b79d0fd5b50e6455e5e9f0931ece978">00087</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#be32dc19e71d40322ad9828b9ab40853">Superclass::IndexType</a> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#be32dc19e71d40322ad9828b9ab40853">IndexType</a>; <a name="l00088"></a><a class="code" href="classitk_1_1PathIterator.html#b4005250e7ed5a0e12eecd36b15f1c4d">00088</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::IndexValueType IndexValueType; <a name="l00089"></a><a class="code" href="classitk_1_1PathIterator.html#9710beccf300dcd919e4dcb4c6683929">00089</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::OffsetType OffsetType; <a name="l00090"></a><a class="code" href="classitk_1_1PathIterator.html#510a69fc8d0a9d5d61fd1252de74a846">00090</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::OffsetValueType OffsetValueType; <a name="l00091"></a><a class="code" href="classitk_1_1PathIterator.html#0edc1f2df77a06192a7c60c5ec328817">00091</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">Superclass::SizeType</a> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#5bf82236e1e50e653de84c8ead448599">SizeType</a>; <a name="l00092"></a><a class="code" href="classitk_1_1PathIterator.html#35b08829953027ba2260083816da7a0f">00092</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::SizeValueType SizeValueType; <a name="l00093"></a><a class="code" href="classitk_1_1PathIterator.html#66e84ed8b98362be72513da18edeb183">00093</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">Superclass::RegionType</a> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ed8c4a40607d317c666eb96ea265e126">RegionType</a>; <a name="l00094"></a><a class="code" href="classitk_1_1PathIterator.html#67082c3345a9ceac02bcd6835d656d9c">00094</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::ImageType ImageType; <a name="l00095"></a><a class="code" href="classitk_1_1PathIterator.html#18d675f10ad597c43e4874f89f81c4f8">00095</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PixelContainer PixelContainer; <a name="l00096"></a><a class="code" href="classitk_1_1PathIterator.html#a27ea26f44eb07cec78867bc91f83c6e">00096</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PixelContainerPointer PixelContainerPointer; <a name="l00097"></a><a class="code" href="classitk_1_1PathIterator.html#8ff9621d54e0847d613f3f7be7d932b1">00097</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::InternalPixelType InternalPixelType; <a name="l00098"></a><a class="code" href="classitk_1_1PathIterator.html#5c30a1324312a1e10b9e662efb493552">00098</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PixelType PixelType; <a name="l00099"></a><a class="code" href="classitk_1_1PathIterator.html#3e982821e71f05e74a82ef77c7046efd">00099</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::AccessorType AccessorType; <a name="l00100"></a><a class="code" href="classitk_1_1PathIterator.html#3b14a3b19a9711b9dc24b832cd86fb4c">00100</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PathType PathType; <a name="l00101"></a><a class="code" href="classitk_1_1PathIterator.html#9d2c6cda89cb1da4f63a9790fae93bba">00101</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PathInputType PathInputType; <a name="l00102"></a><a class="code" href="classitk_1_1PathIterator.html#87002241d6b1b050ea91b5ae39d207da">00102</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PathOutputType PathOutputType; <a name="l00103"></a>00103 <a name="l00105"></a>00105 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1PathIterator.html" title="PathIterator iterates (traces) over a path through an image.">PathIterator</a>, <a class="code" href="classitk_1_1PathConstIterator.html" title="PathConstIterator iterates (traces) over a path through an image.">PathConstIterator</a>); <a name="l00106"></a>00106 <a name="l00107"></a>00107 <a name="l00108"></a>00108 <a name="l00110"></a><a class="code" href="classitk_1_1PathIterator.html#06b1316a14fa01832c8514abb831185e">00110</a> <span class="keywordtype">void</span> Set( <span class="keyword">const</span> PixelType & value) <a name="l00111"></a>00111 { <a name="l00112"></a>00112 <span class="comment">// Normally, this would just be the following:</span> <a name="l00113"></a>00113 <span class="comment">// m_Image->SetPixel(m_CurrentImageIndex,value);</span> <a name="l00114"></a>00114 <span class="comment">// However, we don't want a warning about m_Image being a ConstPointer</span> <a name="l00115"></a>00115 <span class="comment">// in the Superclass.</span> <a name="l00116"></a>00116 <span class="keyword">const_cast<</span>ImageType *<span class="keyword">></span>(this->m_Image.GetPointer())-> <a name="l00117"></a>00117 SetPixel(this->m_CurrentImageIndex,value); <a name="l00118"></a>00118 } <a name="l00120"></a>00120 <a name="l00124"></a><a class="code" href="classitk_1_1PathIterator.html#5b20e295d0e406c0875f14e476360359">00124</a> PixelType & Value(<span class="keywordtype">void</span>) <a name="l00125"></a>00125 { <a name="l00126"></a>00126 <span class="keywordflow">return</span> this->GetImage()->GetPixel(this->m_ImageIndex); <a name="l00127"></a>00127 } <a name="l00128"></a>00128 <a name="l00131"></a>00131 <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a> &operator=(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>& it); <a name="l00132"></a>00132 <a name="l00134"></a>00134 <a class="code" href="classitk_1_1PathIterator.html" title="PathIterator iterates (traces) over a path through an image.">PathIterator</a>(ImageType *imagePtr, <span class="keyword">const</span> PathType *pathPtr); <a name="l00135"></a>00135 <a name="l00137"></a><a class="code" href="classitk_1_1PathIterator.html#cd07f3d11a009de4cd89ea017d77ba24">00137</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1PathIterator.html#cd07f3d11a009de4cd89ea017d77ba24">~PathIterator</a>() {}; <a name="l00138"></a>00138 }; <a name="l00139"></a>00139 <a name="l00140"></a>00140 } <span class="comment">// end namespace itk</span> <a name="l00141"></a>00141 <a name="l00142"></a>00142 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#include "itkPathIterator.txx"</span> <a name="l00144"></a>00144 <span class="preprocessor">#endif</span> <a name="l00145"></a>00145 <span class="preprocessor"></span> <a name="l00146"></a>00146 <span class="preprocessor">#endif </span> <a name="l00147"></a>00147 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 23:49:20 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>