<!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: itkWatershedBoundaryResolver.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_16b0d2d22c345042f35cebae66b36010.html">Algorithms</a> </div> <div class="contents"> <h1>itkWatershedBoundaryResolver.h</h1><a href="itkWatershedBoundaryResolver_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: itkWatershedBoundaryResolver.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-01-27 19:30:17 $</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"> 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 __itkWatershedBoundaryResolver_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkWatershedBoundaryResolver_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span> <a name="l00020"></a>00020 <span class="preprocessor">#if defined(_MSC_VER)</span> <a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#pragma warning ( disable : 4786 )</span> <a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="itkWatershedBoundary_8h.html">itkWatershedBoundary.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkEquivalencyTable_8h.html">itkEquivalencyTable.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkWatershedSegmenter_8h.html">itkWatershedSegmenter.h</a>"</span> <a name="l00026"></a>00026 <a name="l00027"></a>00027 <span class="keyword">namespace </span>itk <a name="l00028"></a>00028 { <a name="l00029"></a>00029 <span class="keyword">namespace </span>watershed <a name="l00030"></a>00030 { <a name="l00065"></a>00065 <span class="keyword">template</span> <<span class="keyword">class</span> TPixelType, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> TDimension> <a name="l00066"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">00066</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">BoundaryResolver</a> : <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="l00067"></a>00067 { <a name="l00068"></a>00068 <span class="keyword">public</span>: <a name="l00070"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#d3dc5fad1378728ac90ddaaac45199e2">00070</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">BoundaryResolver</a> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">Self</a>; <a name="l00071"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#59a9964153012e2b7a98246b9fc4bfb6">00071</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_1ProcessObject.html" title="ProcessObject is the base class for all process objects (source, filters, mappers)...">Superclass</a>; <a name="l00072"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#b895ac0aa5b952664118591c21a41c51">00072</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="l00073"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#75732460ba9fe8f1f7b81d1a72bd3231">00073</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="l00074"></a>00074 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">Self</a>); <a name="l00075"></a>00075 <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(WatershedBoundaryResolver, <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="l00077"></a>00077 <a name="l00079"></a>00079 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(ImageDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, TDimension); <a name="l00080"></a>00080 <a name="l00082"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#bdf6083051b526412cf0bc8b9b44c023">00082</a> <span class="keyword">typedef</span> TPixelType PixelType; <a name="l00083"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#6fe7004257f0daa39c75862987655c5f">00083</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1watershed_1_1Boundary.html">Boundary<PixelType, TDimension></a> <a class="code" href="classitk_1_1watershed_1_1Boundary.html">BoundaryType</a>; <a name="l00084"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#e7befdc648674fe2cd07ef7517090f5a">00084</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1EquivalencyTable.html" title="Hash table to manage integral label equivalencies.">EquivalencyTable</a> <a class="code" href="classitk_1_1EquivalencyTable.html" title="Hash table to manage integral label equivalencies.">EquivalencyTableType</a>; <a name="l00085"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#0657493367b90d4b3857dfdb40d6f15f">00085</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1watershed_1_1Segmenter.html">Segmenter<Image<TPixelType, TDimension></a> > <a class="code" href="classitk_1_1watershed_1_1Segmenter.html">SegmenterType</a>; <a name="l00086"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#78eec3e687a52d5ca8f67668cf1f9248">00086</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="l00087"></a>00087 <a name="l00089"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#8d64a693f569d1edb4294def7ecd4038">00089</a> <span class="keywordtype">void</span> SetBoundaryA(<a class="code" href="classitk_1_1watershed_1_1Boundary.html">BoundaryType</a> *bd) <a name="l00090"></a>00090 { this-><a class="code" href="classitk_1_1ProcessObject.html#148829de75f8eae1161af95151710808">ProcessObject::SetNthInput</a>(0, bd); } <a name="l00091"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#df01213b40cc34ec75e7de55496da3b7">00091</a> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">BoundaryType::Pointer</a> GetBoundaryA() <a name="l00092"></a>00092 { <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code" href="classitk_1_1watershed_1_1Boundary.html">BoundaryType</a> *<span class="keyword">></span>(this->GetInput(0)); } <a name="l00094"></a>00094 <a name="l00096"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#67577054dfd34ad8cac0c957341c8abc">00096</a> <span class="keywordtype">void</span> SetBoundaryB(<a class="code" href="classitk_1_1watershed_1_1Boundary.html">BoundaryType</a> *bd) <a name="l00097"></a>00097 { this-><a class="code" href="classitk_1_1ProcessObject.html#148829de75f8eae1161af95151710808">ProcessObject::SetNthInput</a>(1, bd); } <a name="l00098"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#592cdc188c78cc7a0241bbbcc18c9d03">00098</a> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">BoundaryType::Pointer</a> GetBoundaryB() <a name="l00099"></a>00099 { <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code" href="classitk_1_1watershed_1_1Boundary.html">BoundaryType</a> *<span class="keyword">></span>(this->GetInput(1)); } <a name="l00101"></a>00101 <a name="l00104"></a>00104 <a class="code" href="itkMacro_8h.html#7ebdd33cc5e7d74720ced9099c034faa">itkSetMacro</a>(Face, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>); <a name="l00105"></a>00105 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>(Face, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>); <a name="l00107"></a>00107 <a name="l00111"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#264260f772005b4ddee18600c4a99e94">00111</a> <span class="keywordtype">void</span> SetEquivalencyTable(<a class="code" href="classitk_1_1SmartPointer.html">EquivalencyTableType::Pointer</a> a) <a name="l00112"></a>00112 { this-><a class="code" href="classitk_1_1ProcessObject.html#2e8baf7173919c763c0ce5a5acc9146c">ProcessObject::SetNthOutput</a>(0, a.<a class="code" href="classitk_1_1SmartPointer.html#0734d2308d93e0ca10199b79531db5de">GetPointer</a>()); } <a name="l00113"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#e61b2427a0b04c3c17e03feadeedfaea">00113</a> <a class="code" href="classitk_1_1SmartPointer.html">EquivalencyTableType::Pointer</a> GetEquivalencyTable() <a name="l00114"></a>00114 { <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><a class="code" href="classitk_1_1EquivalencyTable.html" title="Hash table to manage integral label equivalencies.">EquivalencyTableType</a> *<span class="keyword">></span> <a name="l00115"></a>00115 (this-><a class="code" href="classitk_1_1ProcessObject.html#f24a0bf37dae4c4ea24a03caf200588d">ProcessObject::GetOutput</a>(0)); } <a name="l00117"></a>00117 <a name="l00119"></a>00119 <span class="keywordtype">void</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#f75a5945cdd8315676941024a0b8c1e9">GenerateData</a>(); <a name="l00120"></a>00120 <a name="l00122"></a>00122 <span class="keyword">virtual</span> DataObjectPointer MakeOutput(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx); <a name="l00123"></a>00123 <span class="keyword">protected</span>: <a name="l00124"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#8c3242bc279029ea1ef01d0166e96ce1">00124</a> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">BoundaryResolver</a>() : m_Face(0) <a name="l00125"></a>00125 { <a name="l00126"></a>00126 <a class="code" href="classitk_1_1SmartPointer.html">EquivalencyTable::Pointer</a> eq <a name="l00127"></a>00127 = <span class="keyword">static_cast<</span><a class="code" href="classitk_1_1EquivalencyTable.html" title="Hash table to manage integral label equivalencies.">EquivalencyTable</a>*<span class="keyword">></span>(this->MakeOutput(0).GetPointer()); <a name="l00128"></a>00128 this->SetNumberOfRequiredOutputs(1); <a name="l00129"></a>00129 this-><a class="code" href="classitk_1_1ProcessObject.html#2e8baf7173919c763c0ce5a5acc9146c">ProcessObject::SetNthOutput</a>(0, eq.<a class="code" href="classitk_1_1SmartPointer.html#0734d2308d93e0ca10199b79531db5de">GetPointer</a>()); <a name="l00130"></a>00130 } <a name="l00131"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#7d4c4dc94e8c39e1b080dd8c5610dc47">00131</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#7d4c4dc94e8c39e1b080dd8c5610dc47">~BoundaryResolver</a>() {} <a name="l00132"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#6512d7497aaf6221bac03d94c24aacea">00132</a> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#6512d7497aaf6221bac03d94c24aacea">BoundaryResolver</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">Self</a>&) {} <a name="l00133"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#ddb3b52669de24233ae1f4ec53ac3091">00133</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#ddb3b52669de24233ae1f4ec53ac3091">operator=</a>(<span class="keyword">const</span> <a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html">Self</a>&) {} <a name="l00134"></a>00134 <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="l00136"></a>00136 <a name="l00137"></a><a class="code" href="classitk_1_1watershed_1_1BoundaryResolver.html#550e0eb91a9f129738edd213caf64b94">00137</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> m_Face; <a name="l00138"></a>00138 <span class="keywordtype">void</span> GenerateOutputRequestedRegion(<a class="code" href="classitk_1_1DataObject.html" title="Base class for all data objects in ITK.">DataObject</a> *output); <a name="l00139"></a>00139 }; <a name="l00140"></a>00140 <a name="l00141"></a>00141 }<span class="comment">// end namespace watershed</span> <a name="l00142"></a>00142 }<span class="comment">// end namespace itk</span> <a name="l00143"></a>00143 <a name="l00144"></a>00144 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#include "itkWatershedBoundaryResolver.txx"</span> <a name="l00146"></a>00146 <span class="preprocessor">#endif</span> <a name="l00147"></a>00147 <span class="preprocessor"></span> <a name="l00148"></a>00148 <span class="preprocessor">#endif</span> <a name="l00149"></a>00149 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Fri May 8 00:40:01 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>