<!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: itkFlatStructuringElement.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_dd352b1cbb04f9ff09fa5f33693fed9f.html">Review</a> </div> <div class="contents"> <h1>itkFlatStructuringElement.h</h1><a href="itkFlatStructuringElement_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: itkFlatStructuringElement.h,v $</span> <a name="l00005"></a>00005 <span class="comment"> Language: C++</span> <a name="l00006"></a>00006 <span class="comment"> Date: $Date: 2008-12-06 13:28:10 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.16 $</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 <a name="l00018"></a>00018 <span class="preprocessor">#ifndef __itkFlatStructuringElement_h</span> <a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define __itkFlatStructuringElement_h</span> <a name="l00020"></a>00020 <span class="preprocessor"></span> <a name="l00021"></a>00021 <span class="preprocessor">#include "<a class="code" href="itkNeighborhood_8h.html">itkNeighborhood.h</a>"</span> <a name="l00022"></a>00022 <span class="preprocessor">#include "<a class="code" href="itkSize_8h.html">itkSize.h</a>"</span> <a name="l00023"></a>00023 <span class="preprocessor">#include "<a class="code" href="itkOffset_8h.html">itkOffset.h</a>"</span> <a name="l00024"></a>00024 <span class="preprocessor">#include <vector></span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkVector_8h.html">itkVector.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="l00041"></a>00041 <span class="keyword">template</span><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> VDimension> <a name="l00042"></a><a class="code" href="classitk_1_1FlatStructuringElement.html">00042</a> <span class="keyword">class </span><a class="code" href="itkWin32Header_8h.html#7d4384322557205d75f0719c012dded6">ITK_EXPORT</a> <a class="code" href="classitk_1_1FlatStructuringElement.html" title="A class to support a variety of flat structuring elements, including versions created...">FlatStructuringElement</a> : <span class="keyword">public</span> <a class="code" href="classitk_1_1Neighborhood.html" title="A light-weight container object for storing an N-dimensional neighborhood of values...">Neighborhood</a> <bool, VDimension> <a name="l00043"></a>00043 { <a name="l00044"></a>00044 <span class="keyword">public</span>: <a name="l00046"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#cb7231fab914ab971c50dd7a4fc25c13">00046</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1FlatStructuringElement.html" title="A class to support a variety of flat structuring elements, including versions created...">FlatStructuringElement< VDimension></a> <a class="code" href="classitk_1_1FlatStructuringElement.html" title="A class to support a variety of flat structuring elements, including versions created...">Self</a>; <a name="l00047"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#5e0759dd0b6aea03df04072f246b8e31">00047</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Neighborhood.html">Neighborhood<bool, VDimension></a> <a class="code" href="classitk_1_1Neighborhood.html">Superclass</a>; <a name="l00048"></a>00048 <a name="l00050"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#1def05632b31353a9c882df554c8e255">00050</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::PixelType PixelType; <a name="l00051"></a>00051 <a name="l00055"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#1f4d10fbd8da46aab63ce346751a4abf">00055</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::Iterator Iterator; <a name="l00056"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#e2b44e348aa55d5055c65aa98d48310e">00056</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::ConstIterator ConstIterator; <a name="l00057"></a>00057 <a name="l00059"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#70bad0e431da0aa5ed197a3a3b17b7b5">00059</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Superclass::SizeType</a> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">SizeType</a>; <a name="l00060"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#a804a882a95a8951751587b7465d9b55">00060</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Superclass::SizeValueType SizeValueType; <a name="l00061"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#d8fad4e47035e1cd20a848475d2a9e41">00061</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Offset.html">Superclass::OffsetType</a> <a class="code" href="classitk_1_1Offset.html">OffsetType</a>; <a name="l00062"></a>00062 <a name="l00064"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#4f957ceed249abf535f2b3b2107b8e45">00064</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">Superclass::RadiusType</a> <a class="code" href="classitk_1_1Size.html" title="Represent the size (bounds) of a n-dimensional image.">RadiusType</a>; <a name="l00065"></a>00065 <a name="l00067"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#2b80d638b9e5cc8835a0d37b2a191f61">00067</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SliceIterator.html" title="A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel...">Superclass::SliceIteratorType</a> <a class="code" href="classitk_1_1SliceIterator.html" title="A flexible iterator for itk containers(i.e. itk::Neighborhood) that support pixel...">SliceIteratorType</a>; <a name="l00068"></a>00068 <a name="l00070"></a>00070 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(NeighborhoodDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, VDimension); <a name="l00071"></a>00071 <a name="l00072"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#0c78491abb8251f8fe3a10db2602bd6d">00072</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Vector.html">Vector<float, VDimension></a> <a class="code" href="classitk_1_1Vector.html">LType</a>; <a name="l00073"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#46d7addef0be81263adfd390d2fbea07">00073</a> <span class="keyword">typedef</span> std::vector<LType> DecompType; <a name="l00074"></a>00074 <a name="l00076"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#3f0c4ed0057a07ab0f0d0ecf19e9bb0b">00076</a> <span class="keyword">virtual</span> <a class="code" href="classitk_1_1FlatStructuringElement.html#3f0c4ed0057a07ab0f0d0ecf19e9bb0b">~FlatStructuringElement</a>() {} <a name="l00077"></a>00077 <a name="l00079"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#3ce60642ec6fa0ca7e1c1687d4338700">00079</a> <a class="code" href="classitk_1_1FlatStructuringElement.html#3ce60642ec6fa0ca7e1c1687d4338700">FlatStructuringElement</a>() {m_Decomposable=<span class="keyword">false</span>;} <a name="l00080"></a>00080 <a name="l00087"></a>00087 <span class="keyword">static</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a> Box(RadiusType radius); <a name="l00088"></a>00088 <a name="l00090"></a>00090 <span class="keyword">static</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a> Ball(RadiusType radius); <a name="l00091"></a>00091 <a name="l00093"></a>00093 <span class="keyword">static</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a> <a class="code" href="classCross.html" title="Compute the cross product of two vectors of dimension 3, independently of the type...">Cross</a>( RadiusType radius ); <a name="l00094"></a>00094 <a name="l00096"></a>00096 <span class="keyword">static</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a> Annulus( RadiusType radius, <a name="l00097"></a>00097 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> thickness = 1, <a name="l00098"></a>00098 <span class="keywordtype">bool</span> includeCenter = <span class="keyword">false</span> ); <a name="l00099"></a>00099 <a name="l00105"></a>00105 <span class="keyword">static</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a> Poly(RadiusType radius, <span class="keywordtype">unsigned</span> lines); <a name="l00106"></a>00106 <a name="l00112"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#d170cf21b1f5715422bc8fffea19ca97">00112</a> <span class="keywordtype">bool</span> GetDecomposable()<span class="keyword"> const</span> <a name="l00113"></a>00113 <span class="keyword"> </span>{ <a name="l00114"></a>00114 <span class="keywordflow">return</span> m_Decomposable; <a name="l00115"></a>00115 } <a name="l00116"></a>00116 <a name="l00118"></a><a class="code" href="classitk_1_1FlatStructuringElement.html#846fb503e2b87f10077a20d7248b9f12">00118</a> <span class="keyword">const</span> DecompType & GetLines()<span class="keyword"> const</span> <a name="l00119"></a>00119 <span class="keyword"> </span>{ <a name="l00120"></a>00120 <span class="keywordflow">return</span>(m_Lines); <a name="l00121"></a>00121 } <a name="l00122"></a>00122 <a name="l00123"></a>00123 <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="l00124"></a>00124 <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="keyword">protected</span>: <a name="l00127"></a>00127 <a name="l00132"></a>00132 <span class="keywordtype">void</span> ComputeBufferFromLines(); <a name="l00133"></a>00133 <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="keyword">private</span>: <a name="l00136"></a>00136 <span class="keywordtype">bool</span> m_Decomposable; <a name="l00137"></a>00137 <a name="l00138"></a>00138 DecompType m_Lines; <a name="l00139"></a>00139 <a name="l00140"></a>00140 <span class="comment">// dispatch between 2D and 3D</span> <a name="l00141"></a>00141 <span class="keyword">struct </span>DispatchBase {}; <a name="l00142"></a>00142 <span class="keyword">template</span><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> VDimension2> <a name="l00143"></a>00143 <span class="keyword">struct </span>Dispatch : DispatchBase {}; <a name="l00144"></a>00144 <a name="l00145"></a>00145 <span class="keyword">virtual</span> FlatStructuringElement PolySub(<span class="keyword">const</span> Dispatch<2> &, <a name="l00146"></a>00146 RadiusType radius, <a name="l00147"></a>00147 <span class="keywordtype">unsigned</span> lines) <span class="keyword">const</span>; <a name="l00148"></a>00148 <a name="l00149"></a>00149 <span class="keyword">virtual</span> FlatStructuringElement PolySub(<span class="keyword">const</span> Dispatch<3> &, <a name="l00150"></a>00150 RadiusType radius, <a name="l00151"></a>00151 <span class="keywordtype">unsigned</span> lines) <span class="keyword">const</span>; <a name="l00152"></a>00152 <a name="l00153"></a>00153 <span class="keyword">virtual</span> FlatStructuringElement PolySub(<span class="keyword">const</span> DispatchBase &, <a name="l00154"></a>00154 RadiusType radius, <a name="l00155"></a>00155 <span class="keywordtype">unsigned</span> lines) <span class="keyword">const</span>; <a name="l00156"></a>00156 <a name="l00157"></a>00157 <a name="l00158"></a>00158 <span class="keywordtype">bool</span> checkParallel(LType NewVec, DecompType Lines); <a name="l00159"></a>00159 <a name="l00160"></a>00160 <span class="keyword">template</span><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> VDimension3> <a name="l00161"></a>00161 <span class="keyword">struct </span>StructuringElementFacet <a name="l00162"></a>00162 { <a name="l00163"></a>00163 LType P1, P2, P3; <a name="l00164"></a>00164 }; <a name="l00165"></a>00165 <span class="keyword">typedef</span> StructuringElementFacet<VDimension> FacetType; <a name="l00166"></a>00166 }; <a name="l00167"></a>00167 } <span class="comment">// namespace itk</span> <a name="l00168"></a>00168 <a name="l00169"></a>00169 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00170"></a>00170 <span class="preprocessor"></span><span class="preprocessor">#include "itkFlatStructuringElement.txx"</span> <a name="l00171"></a>00171 <span class="preprocessor">#endif</span> <a name="l00172"></a>00172 <span class="preprocessor"></span> <a name="l00173"></a>00173 <a name="l00174"></a>00174 <span class="preprocessor">#endif</span> <a name="l00175"></a>00175 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Thu May 7 22:45:04 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>