<!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: itkVoronoiDiagram2D.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>itkVoronoiDiagram2D.h</h1><a href="itkVoronoiDiagram2D_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: itkVoronoiDiagram2D.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:16 $</span> <a name="l00007"></a>00007 <span class="comment"> Version: $Revision: 1.19 $</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 __itkVoronoiDiagram2D_h</span> <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define __itkVoronoiDiagram2D_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> <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="itkCellInterface_8h.html">itkCellInterface.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="itkLineCell_8h.html">itkLineCell.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="itkMesh_8h.html">itkMesh.h</a>"</span> <a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="itkDefaultDynamicMeshTraits_8h.html">itkDefaultDynamicMeshTraits.h</a>"</span> <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="itkPolygonCell_8h.html">itkPolygonCell.h</a>"</span> <a name="l00029"></a>00029 <span class="preprocessor">#include <vector></span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#ifndef NULL</span> <a name="l00032"></a><a class="code" href="itkVoronoiDiagram2D_8h.html#070d2ce7b6bb7e5c05602aa8c308d0c4">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define NULL 0 </span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00034"></a>00034 <span class="preprocessor"></span> <a name="l00035"></a>00035 <span class="keyword">namespace </span>itk <a name="l00036"></a>00036 { <a name="l00053"></a>00053 <span class="keyword">template</span> <<span class="keyword">typename</span> TCoordType> <a name="l00054"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.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_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">VoronoiDiagram2D</a>: <a name="l00055"></a>00055 <span class="keyword">public</span> <a class="code" href="classitk_1_1Mesh.html" title="Implements the N-dimensional mesh structure.">Mesh</a> <TCoordType, 2, <a name="l00056"></a>00056 DefaultDynamicMeshTraits<TCoordType, 2, 2, TCoordType> > <a name="l00057"></a>00057 { <a name="l00058"></a>00058 <span class="keyword">public</span>: <a name="l00060"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#83d9312ab2d49963996a8bb7c2d34220">00060</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">VoronoiDiagram2D</a> <a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">Self</a>; <a name="l00061"></a>00061 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Mesh.html" title="Implements the N-dimensional mesh structure.">Mesh</a> <TCoordType, 2, <a name="l00062"></a>00062 <a class="code" href="classitk_1_1DefaultDynamicMeshTraits.html">DefaultDynamicMeshTraits<TCoordType, 2, 2, TCoordType></a> > <a name="l00063"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#7dd442775bc0d31b617d91b899381687">00063</a> <a class="code" href="classitk_1_1Mesh.html">Superclass</a>; <a name="l00064"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#7854d941457e154612bc440ecfa5b5ad">00064</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="l00065"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#aac51a24e6d390d4ddef67ae2e47e3b7">00065</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="l00066"></a>00066 <a name="l00068"></a>00068 <a class="code" href="itkMacro_8h.html#0fdc15685afa271857c57e7cd482f30c">itkNewMacro</a>(<a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">Self</a>); <a name="l00069"></a>00069 <a name="l00071"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#30ebb86d39d9c347841b7ab60de9b173">00071</a> <a class="code" href="itkMacro_8h.html#574c1f86661d409dd32c742307a0e96a">itkTypeMacro</a>(<a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">VoronoiDiagram2D</a>, <a class="code" href="classitk_1_1Mesh.html" title="Implements the N-dimensional mesh structure.">Mesh</a>); <a name="l00072"></a>00072 <a name="l00074"></a>00074 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1DefaultDynamicMeshTraits.html">DefaultDynamicMeshTraits<TCoordType, 2, 2, TCoordType></a> <a class="code" href="classitk_1_1DefaultDynamicMeshTraits.html">MeshTraits</a>; <a name="l00075"></a>00075 <a name="l00077"></a>00077 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(PointDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a name="l00078"></a>00078 MeshTraits::PointDimension); <a name="l00079"></a>00079 <a class="code" href="itkMacro_8h.html#1905cf6b2e88235996fa7ff73b2fb0eb">itkStaticConstMacro</a>(MaxTopologicalDimension, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, <a name="l00080"></a>00080 MeshTraits::MaxTopologicalDimension); <a name="l00082"></a>00082 <a name="l00084"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#a45e25f3b2595cbb77338c47bc0dce56">00084</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::PixelType PixelType; <a name="l00085"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#0ebfe39a86d9de726e4ca4fb640b1eb6">00085</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::CoordRepType CoordRepType; <a name="l00086"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#98bac44215d5e39124748aa696dedac6">00086</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::InterpolationWeightType InterpolationWeightType; <a name="l00087"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#8064b4bbc6ed2f6b4ff8e9508042143d">00087</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::PointIdentifier PointIdentifier; <a name="l00088"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#895459785e0d2b873739258613296352">00088</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::CellIdentifier CellIdentifier; <a name="l00089"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#36a8d12ae142ace340f5e910477a9ddc">00089</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::CellFeatureIdentifier CellFeatureIdentifier; <a name="l00090"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#297e15240f89ec69a85cd07d46ebd207">00090</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">MeshTraits::PointType</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a>; <a name="l00091"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#d3ef4b5cd75477b4659ff1b18a74a7e0">00091</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MapContainer.html">MeshTraits::PointsContainer</a> <a class="code" href="classitk_1_1MapContainer.html">PointsContainer</a>; <a name="l00092"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#0f6bac3eb6d959bbd78ae2751d5bd740">00092</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::CellTraits CellTraits; <a name="l00093"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#db8201741362c4186256effbd1713315">00093</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MapContainer.html">MeshTraits::CellsContainer</a> <a class="code" href="classitk_1_1MapContainer.html">CellsContainer</a>; <a name="l00094"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#31f465d768eed0ba1c7830cdda9b6211">00094</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::PointCellLinksContainer PointCellLinksContainer; <a name="l00095"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#92fe8ad994b3bac01c53d8b94efdf231">00095</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MapContainer.html">MeshTraits::CellLinksContainer</a> <a class="code" href="classitk_1_1MapContainer.html">CellLinksContainer</a>; <a name="l00096"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#154285512c43d4eee12bdddd20099e1f">00096</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MapContainer.html">MeshTraits::PointDataContainer</a> <a class="code" href="classitk_1_1MapContainer.html">PointDataContainer</a>; <a name="l00097"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#8d25af014417de01eee6fb56c4e31c5f">00097</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1MapContainer.html">MeshTraits::CellDataContainer</a> <a class="code" href="classitk_1_1MapContainer.html">CellDataContainer</a>; <a name="l00098"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#aeb6ad563ccf35a45697ef42190de0d4">00098</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MeshTraits::CellAutoPointer genericCellPointer; <a name="l00099"></a>00099 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1PointLocator.html" title="Accelerate geometric searches for points.">PointLocator</a><PointIdentifier,<a class="code" href="itkMacro_8h.html#94ef2dc11d52c8ef0a78e34558feb8cb">itkGetStaticConstMacro</a>(PointDimension), <a name="l00100"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#c7b50847615d4cfe8a82911130eb69f8">00100</a> CoordRepType,<a class="code" href="classitk_1_1MapContainer.html">PointsContainer</a>> <a class="code" href="classitk_1_1PointLocator.html" title="Accelerate geometric searches for points.">PointLocatorType</a>; <a name="l00101"></a>00101 <span class="keyword">typedef</span> <a class="code" href="classitk_1_1BoundingBox.html" title="Represent and compute information about bounding boxes.">BoundingBox</a><PointIdentifier,<a class="code" href="itkMacro_8h.html#94ef2dc11d52c8ef0a78e34558feb8cb">itkGetStaticConstMacro</a>(PointDimension), <a name="l00102"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#0dc68ce46ef238c88cd0e211ac44babf">00102</a> CoordRepType,<a class="code" href="classitk_1_1MapContainer.html">PointsContainer</a>> <a class="code" href="classitk_1_1BoundingBox.html" title="Represent and compute information about bounding boxes.">BoundingBoxType</a>; <a name="l00103"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#e01915c46a89c7c424e5f0128b29d4e0">00103</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">PointsContainer::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">PointsContainerPointer</a>; <a name="l00104"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#461b010236fee9361ccccab4613bd091">00104</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">CellsContainer::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">CellsContainerPointer</a>; <a name="l00105"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#2660911b6122bde9f16c2a42871de277">00105</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">CellLinksContainer::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">CellLinksContainerPointer</a>; <a name="l00106"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#61abaecc5d91d150f1df5fc336ef28ad">00106</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">PointDataContainer::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">PointDataContainerPointer</a>; <a name="l00107"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#f4735fb8173c469d9cb4c22d8f1c838f">00107</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">CellDataContainer::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">CellDataContainerPointer</a>; <a name="l00108"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#2407845c93924274f27ac3c6d05c8ff8">00108</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">PointLocatorType::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">PointLocatorPointer</a>; <a name="l00109"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#e9d8c422942b2a44b9177db52e78a08b">00109</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classitk_1_1SmartPointer.html">BoundingBoxType::Pointer</a> <a class="code" href="classitk_1_1SmartPointer.html">BoundingBoxPointer</a>; <a name="l00110"></a>00110 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00111"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#beb198f3692d16e6fd1dcf121e756fae">00111</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">PointsContainer::ConstIterator</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">PointsContainerConstIterator</a>; <a name="l00112"></a>00112 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00113"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#5af45ab8778ecb925c832f7202e5d0a5">00113</a> <a class="code" href="classitk_1_1MapContainer_1_1Iterator.html" title="The non-const iterator type for the map.">PointsContainer::Iterator</a> <a class="code" href="classitk_1_1MapContainer_1_1Iterator.html" title="The non-const iterator type for the map.">PointsContainerIterator</a>; <a name="l00114"></a>00114 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00115"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#60635cf10e7f15ed3d81d9e7866996b1">00115</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">CellsContainer::ConstIterator</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">CellsContainerConstIterator</a>; <a name="l00116"></a>00116 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00117"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#84bc4d6abf6ee0eb19230be861ca7732">00117</a> <a class="code" href="classitk_1_1MapContainer_1_1Iterator.html" title="The non-const iterator type for the map.">CellsContainer::Iterator</a> <a class="code" href="classitk_1_1MapContainer_1_1Iterator.html" title="The non-const iterator type for the map.">CellsContainerIterator</a>; <a name="l00118"></a>00118 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00119"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#86ac6989b4ea8b34c470b6d0838c53dd">00119</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">CellLinksContainer::ConstIterator</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">CellLinksContainerIterator</a>; <a name="l00120"></a>00120 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00121"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#9b2cf6234903ca1020a6d929bf6e9ca1">00121</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">PointDataContainer::ConstIterator</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">PointDataContainerIterator</a>; <a name="l00122"></a>00122 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00123"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#747eea3d63a0f875a8af09fc1111b143">00123</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">CellDataContainer::ConstIterator</a> <a class="code" href="classitk_1_1MapContainer_1_1ConstIterator.html" title="The const iterator type for the map.">CellDataContainerIterator</a>; <a name="l00124"></a>00124 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a name="l00125"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#496b1024743cb2f1f9be7c55b1973d85">00125</a> PointCellLinksContainer::const_iterator PointCellLinksContainerIterator; <a name="l00127"></a>00127 <a name="l00128"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#45bce0deecf00f190b21901647a8a653">00128</a> <span class="keyword">typedef</span> CellFeatureIdentifier CellFeatureCount; <a name="l00129"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#21239ac608ec2b6d8b8ed7313fe9c3e0">00129</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1CellInterface.html">CellInterface<PixelType,CellTraits></a> <a class="code" href="classitk_1_1CellInterface.html">CellInterfaceType</a>; <a name="l00130"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#cb7bfcf4482dc188d331182f697568ce">00130</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1PolygonCell.html">PolygonCell<CellInterfaceType></a> <a class="code" href="classitk_1_1PolygonCell.html">CellType</a>; <a name="l00131"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#0d7690d201851f305008f571f2281813">00131</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> CellType::CellAutoPointer CellAutoPointer; <a name="l00132"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#6a86df2e16eea52e65c2a4d85f14a246">00132</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">Point<int,2></a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a>; <a name="l00133"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#f25b8086a46f1153e272dd1259faae66">00133</a> <span class="keyword">typedef</span> std::deque<EdgeInfo> EdgeInfoDQ; <a name="l00134"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#bf1d70dbb09ac4bdebc45b7c2cbe643a">00134</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> CellType::MultiVisitor CellMultiVisitorType; <a name="l00135"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#1b654421297edad3c337902a4c478891">00135</a> <span class="keyword">typedef</span> std::vector<PointType> SeedsType; <a name="l00136"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#3916d373e6f4b46b83796a39b4d23a3e">00136</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> SeedsType::iterator SeedsIterator; <a name="l00137"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#10a916b39f24d02809f84ce93525e146">00137</a> <span class="keyword">typedef</span> <a class="code" href="classitk_1_1LineCell.html">LineCell <CellInterfaceType></a> <a class="code" href="classitk_1_1LineCell.html">Edge</a>; <a name="l00138"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#84085b336e1d2be9804acc3cb3253f7a">00138</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> Edge::SelfAutoPointer EdgeAutoPointer; <a name="l00139"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#438d22cf1b50d31175d52ef117447e0f">00139</a> <span class="keyword">typedef</span> std::list<PointType> PointList; <a name="l00140"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#74aee2986efbb53b28c0cdba984ad54f">00140</a> <span class="keyword">typedef</span> std::vector<int> INTvector; <a name="l00141"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#6605aa38e34c110561dd921285249443">00141</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> INTvector::iterator NeighborIdIterator; <a name="l00142"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#2006b80d1dfd33b05d1a21b6aa36d0ab">00142</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> std::vector<PointType>::iterator VertexIterator; <a name="l00143"></a>00143 <a name="l00145"></a>00145 <a class="code" href="itkMacro_8h.html#1600305bb01e39e87c472d8bf29bd1cf">itkGetMacro</a>(NumberOfSeeds,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>); <a name="l00146"></a>00146 <a name="l00149"></a>00149 <span class="keywordtype">void</span> SetSeeds (<span class="keywordtype">int</span> num, SeedsIterator begin); <a name="l00150"></a>00150 <a name="l00152"></a>00152 <span class="keywordtype">void</span> SetBoundary(<a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> vorsize); <a name="l00153"></a>00153 <span class="keywordtype">void</span> SetOrigin(<a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> vorsize); <a name="l00155"></a>00155 <a name="l00157"></a>00157 NeighborIdIterator NeighborIdsBegin(<span class="keywordtype">int</span> seeds); <a name="l00158"></a>00158 NeighborIdIterator NeighborIdsEnd(<span class="keywordtype">int</span> seeds); <a name="l00160"></a>00160 <a name="l00162"></a>00162 VertexIterator VertexBegin(<span class="keywordtype">void</span>); <a name="l00163"></a>00163 VertexIterator VertexEnd(<span class="keywordtype">void</span>); <a name="l00165"></a>00165 <a name="l00167"></a>00167 <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> GetSeed(<span class="keywordtype">int</span> SeedID); <a name="l00168"></a>00168 <a name="l00170"></a>00170 <span class="keywordtype">void</span> GetCellId(CellIdentifier cellId, CellAutoPointer &); <a name="l00171"></a>00171 <a name="l00173"></a>00173 <span class="keywordtype">void</span> GetPoint(<span class="keywordtype">int</span> pId,<a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> *answer); <a name="l00174"></a>00174 <a name="l00175"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html">00175</a> <span class="keyword">class </span><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html">VoronoiEdge</a>{ <a name="l00176"></a>00176 <span class="keyword">public</span>: <a name="l00177"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#5be4b0b7223b1723dff6454d7f48c941">00177</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> m_Left; <a name="l00178"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#957bf9219c88389963fe39600d546aa5">00178</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> m_Right; <a name="l00179"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#466d839272af71ed2978e3eaab7755df">00179</a> <span class="keywordtype">int</span> m_LeftID; <a name="l00180"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#4a777034fe73ff9a5c2d3acdd423d95c">00180</a> <span class="keywordtype">int</span> m_RightID; <a name="l00181"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#1738788132ce52d40f357c9e3399940e">00181</a> <span class="keywordtype">int</span> m_LineID; <a name="l00182"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#6355de4853790e6796fc5c59607a6259">00182</a> <a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#6355de4853790e6796fc5c59607a6259">VoronoiEdge</a>(){} <a name="l00183"></a><a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#b6bee51efec282582466d33a14c2a9a6">00183</a> <a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html#b6bee51efec282582466d33a14c2a9a6">~VoronoiEdge</a>(){} <a name="l00184"></a>00184 }; <a name="l00185"></a>00185 <a name="l00187"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#76e6e4fbd5132ab2ca4de402f95391c3">00187</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> std::vector<VoronoiEdge>::iterator VoronoiEdgeIterator; <a name="l00188"></a>00188 <a name="l00190"></a>00190 VoronoiEdgeIterator EdgeBegin(<span class="keywordtype">void</span>); <a name="l00191"></a>00191 VoronoiEdgeIterator EdgeEnd(<span class="keywordtype">void</span>); <a name="l00193"></a>00193 <a name="l00195"></a>00195 <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a> GetSeedsIDAroundEdge(<a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html">VoronoiEdge</a> *task); <a name="l00196"></a>00196 <a name="l00197"></a>00197 <span class="comment">/********************************************************/</span> <a name="l00198"></a>00198 <a name="l00199"></a>00199 <span class="keywordtype">void</span> Reset(); <a name="l00200"></a>00200 <span class="keywordtype">void</span> InsertCells(); <a name="l00201"></a>00201 <a name="l00202"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#476e50fbe94a3225a041f3edf705d7c0">00202</a> <span class="keywordtype">void</span> AddCellNeighbor(<a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a> x) <a name="l00203"></a>00203 { <a name="l00204"></a>00204 m_CellNeighborsID[x[0]].push_back(x[1]); <a name="l00205"></a>00205 m_CellNeighborsID[x[1]].push_back(x[0]); <a name="l00206"></a>00206 } <a name="l00207"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#d62ba305de914c0c326b629542d7a151">00207</a> <span class="keywordtype">void</span> ClearRegion(<span class="keywordtype">int</span> i) <a name="l00208"></a>00208 { m_VoronoiRegions[i]->ClearPoints();} <a name="l00209"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#853d554777c06193fef83feb6f3e8e06">00209</a> <span class="keywordtype">void</span> VoronoiRegionAddPointId(<span class="keywordtype">int</span> <span class="keywordtype">id</span>, <span class="keywordtype">int</span> x) <a name="l00210"></a>00210 { m_VoronoiRegions[id]->AddPointId(x);} <a name="l00211"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#b22416397f5f21d932255aa3f79a4c97">00211</a> <span class="keywordtype">void</span> BuildEdge(<span class="keywordtype">int</span> <span class="keywordtype">id</span>) <a name="l00212"></a>00212 { m_VoronoiRegions[id]->BuildEdges();} <a name="l00213"></a>00213 <a name="l00214"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#b40c93b748edec50ed9e6cfd2e28ee4b">00214</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#b40c93b748edec50ed9e6cfd2e28ee4b">LineListClear</a>(){ m_LineList.clear();} <a name="l00215"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#59dddb9e92ec617b08d7eada06f0284a">00215</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#59dddb9e92ec617b08d7eada06f0284a">EdgeListClear</a>(){ m_EdgeList.clear();} <a name="l00216"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#bf6fa58ec0aae69850d8ded595a332aa">00216</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#bf6fa58ec0aae69850d8ded595a332aa">VertexListClear</a>(){ m_VertexList.clear();} <a name="l00217"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#c035f4122aa3f5d02cb8ae13c32589c0">00217</a> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#c035f4122aa3f5d02cb8ae13c32589c0">LineListSize</a>(){ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>( m_LineList.size() );} <a name="l00218"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#ff48082c971e03e7813b7ac0f32629f9">00218</a> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#ff48082c971e03e7813b7ac0f32629f9">EdgeListSize</a>(){ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>( m_EdgeList.size() );} <a name="l00219"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#7abc7049178e50a02ba683990d53d57d">00219</a> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#7abc7049178e50a02ba683990d53d57d">VertexListSize</a>(){ <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>( m_VertexList.size() );} <a name="l00220"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#1fbf049346e35b40e62b10a76f4f4639">00220</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#1fbf049346e35b40e62b10a76f4f4639">AddLine</a>(<a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a> x){ m_LineList.push_back(x);} <a name="l00221"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#bfc254607ea2110f41e11ec01825965d">00221</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#bfc254607ea2110f41e11ec01825965d">AddEdge</a>(<a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html">VoronoiEdge</a> x){ m_EdgeList.push_back(x);} <a name="l00222"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#52d241975b491bbd0c687169633ec100">00222</a> <span class="keywordtype">void</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#52d241975b491bbd0c687169633ec100">AddVert</a>(<a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> x){ m_VertexList.push_back(x);} <a name="l00223"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#9c456a2ab443578f591ea31dfd5ba719">00223</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#9c456a2ab443578f591ea31dfd5ba719">GetLine</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>){ <span class="keywordflow">return</span> m_LineList[id];} <a name="l00224"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#533ece7016a98da7d85b5a97eae5a1ef">00224</a> <a class="code" href="classitk_1_1VoronoiDiagram2D_1_1VoronoiEdge.html">VoronoiEdge</a> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#533ece7016a98da7d85b5a97eae5a1ef">GetEdge</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>){ <span class="keywordflow">return</span> m_EdgeList[id];} <a name="l00225"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#63899eca79486f9d386c854e31cc1e88">00225</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">PointType</a> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#63899eca79486f9d386c854e31cc1e88">GetVertex</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>){ <span class="keywordflow">return</span> m_VertexList[id];} <a name="l00226"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#a6a4801996c178e8029c07cd875185c6">00226</a> <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a> GetEdgeEnd(<span class="keywordtype">int</span> <span class="keywordtype">id</span>) <a name="l00227"></a>00227 { <a name="l00228"></a>00228 <a class="code" href="classitk_1_1Point.html" title="A templated class holding a geometric point in n-Dimensional space.">EdgeInfo</a> x; <a name="l00229"></a>00229 x[0]=m_EdgeList[id].m_LeftID; <a name="l00230"></a>00230 x[1]=m_EdgeList[id].m_RightID; <a name="l00231"></a>00231 <span class="keywordflow">return</span> x; <a name="l00232"></a>00232 } <a name="l00233"></a><a class="code" href="classitk_1_1VoronoiDiagram2D.html#29b277eb144215b1e05356aa41756fc0">00233</a> <span class="keywordtype">int</span> <a class="code" href="classitk_1_1VoronoiDiagram2D.html#29b277eb144215b1e05356aa41756fc0">GetEdgeLineID</a>(<span class="keywordtype">int</span> <span class="keywordtype">id</span>){ <span class="keywordflow">return</span> m_EdgeList[id].m_LineID; } <a name="l00234"></a>00234 <a name="l00235"></a>00235 <span class="keyword">protected</span>: <a name="l00236"></a>00236 <a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">VoronoiDiagram2D</a>(); <a name="l00237"></a>00237 ~<a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">VoronoiDiagram2D</a>(); <a name="l00238"></a>00238 <span class="keyword">virtual</span> <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="l00239"></a>00239 <a name="l00240"></a>00240 <a name="l00241"></a>00241 <span class="keyword">private</span>: <a name="l00242"></a>00242 <a class="code" href="classitk_1_1VoronoiDiagram2D.html" title="Implements the 2-Dimensional Voronoi Diagram.">VoronoiDiagram2D</a>(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00243"></a>00243 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="namespaceHardConnectedComponentImageFilter.html#ac7d0120fe5292cdcdddb6163b8cb150">Self</a>&); <span class="comment">//purposely not implemented</span> <a name="l00244"></a>00244 <a name="l00245"></a>00245 SeedsType <a class="code" href="namespaceHardConnectedComponentImageFilter.html#508014b7349d5d0146a9fe28b334804e">m_Seeds</a>; <a name="l00246"></a>00246 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_NumberOfSeeds; <a name="l00247"></a>00247 std::vector<CellType *> m_VoronoiRegions; <a name="l00248"></a>00248 PointType m_VoronoiBoundary; <a name="l00249"></a>00249 PointType m_VoronoiBoundaryOrigin; <a name="l00250"></a>00250 std::vector< std::vector<int> > m_CellNeighborsID; <a name="l00251"></a>00251 <a name="l00252"></a>00252 std::vector< EdgeInfo > m_LineList; <a name="l00253"></a>00253 std::vector< PointType > m_VertexList; <a name="l00254"></a>00254 std::vector< VoronoiEdge > m_EdgeList; <a name="l00255"></a>00255 <a name="l00256"></a>00256 }; <span class="comment">// end class: VoronoiDiagram2D</span> <a name="l00257"></a>00257 <a name="l00258"></a>00258 } <span class="comment">// end namespace itk</span> <a name="l00259"></a>00259 <a name="l00260"></a>00260 <span class="preprocessor">#ifndef ITK_MANUAL_INSTANTIATION</span> <a name="l00261"></a>00261 <span class="preprocessor"></span><span class="preprocessor">#include "itkVoronoiDiagram2D.txx"</span> <a name="l00262"></a>00262 <span class="preprocessor">#endif</span> <a name="l00263"></a>00263 <span class="preprocessor"></span> <a name="l00264"></a>00264 <span class="preprocessor">#endif</span> <a name="l00265"></a>00265 <span class="preprocessor"></span> </pre></div></div> <hr><address><small> Generated at Fri May 8 00:36:12 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>