<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VTK: dox/Graphics/vtkDijkstraGraphGeodesicPath.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>dox/Graphics/vtkDijkstraGraphGeodesicPath.h</h1><a href="a02513.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: Visualization Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: vtkDijkstraGraphGeodesicPath.h,v $</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span> <a name="l00007"></a>00007 <span class="comment"> All rights reserved.</span> <a name="l00008"></a>00008 <span class="comment"> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00011"></a>00011 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00012"></a>00012 <span class="comment"> PURPOSE. See the above copyright notice for more information.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span> <a name="l00037"></a>00037 <span class="preprocessor">#ifndef __vtkDijkstraGraphGeodesicPath_h</span> <a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define __vtkDijkstraGraphGeodesicPath_h</span> <a name="l00039"></a>00039 <span class="preprocessor"></span> <a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="a02555.html">vtkGraphGeodesicPath.h</a>"</span> <a name="l00041"></a>00041 <a name="l00042"></a>00042 <span class="keyword">class </span><a class="code" href="a00417.html" title="Helper class due to PIMPL excess.">vtkDijkstraGraphInternals</a>; <a name="l00043"></a>00043 <span class="keyword">class </span><a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>; <a name="l00044"></a>00044 <a name="l00045"></a><a class="code" href="a00416.html">00045</a> <span class="keyword">class </span><a class="code" href="a02170.html#c3c1ffe2fe47b9b70ba90182b7860cce">VTK_GRAPHICS_EXPORT</a> <a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a> : <a name="l00046"></a>00046 <span class="keyword">public</span> <a class="code" href="a00660.html" title="Abstract base for classes that generate a geodesic path on a graph (mesh).">vtkGraphGeodesicPath</a> <a name="l00047"></a>00047 { <a name="l00048"></a>00048 <span class="keyword">public</span>: <a name="l00049"></a>00049 <a name="l00051"></a>00051 <span class="keyword">static</span> <a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a> *<a class="code" href="a01261.html#cf785ac526132296ff652c636f713b5e">New</a>(); <a name="l00052"></a>00052 <a name="l00054"></a>00054 <a name="l00055"></a><a class="code" href="a00416.html#a97d4ab9fb877fca0b62d086b36517d9">00055</a> vtkTypeRevisionMacro(<a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a>,<a class="code" href="a00660.html" title="Abstract base for classes that generate a geodesic path on a graph (mesh).">vtkGraphGeodesicPath</a>); <a name="l00056"></a>00056 <span class="keywordtype">void</span> <a class="code" href="a00660.html#e1caeb92cdd72008a4a230032de162ae">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00058"></a>00058 <a name="l00060"></a>00060 <a name="l00061"></a>00061 vtkGetObjectMacro(IdList, <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a>); <a name="l00063"></a>00063 <a name="l00065"></a>00065 <a name="l00067"></a>00067 vtkSetMacro(StopWhenEndReached, <span class="keywordtype">int</span>); <a name="l00068"></a>00068 vtkGetMacro(StopWhenEndReached, <span class="keywordtype">int</span>); <a name="l00069"></a>00069 vtkBooleanMacro(StopWhenEndReached, <span class="keywordtype">int</span>); <a name="l00071"></a>00071 <a name="l00073"></a>00073 <a name="l00074"></a>00074 vtkSetMacro(UseScalarWeights, <span class="keywordtype">int</span>); <a name="l00075"></a>00075 vtkGetMacro(UseScalarWeights, <span class="keywordtype">int</span>); <a name="l00076"></a>00076 vtkBooleanMacro(UseScalarWeights, <span class="keywordtype">int</span>); <a name="l00078"></a>00078 <a name="l00080"></a>00080 <a name="l00081"></a>00081 vtkSetMacro(RepelPathFromVertices, <span class="keywordtype">int</span>); <a name="l00082"></a>00082 vtkGetMacro(RepelPathFromVertices, <span class="keywordtype">int</span>); <a name="l00083"></a>00083 vtkBooleanMacro(RepelPathFromVertices, <span class="keywordtype">int</span>); <a name="l00085"></a>00085 <a name="l00087"></a>00087 <a name="l00088"></a>00088 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetRepelVertices(<a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>*); <a name="l00089"></a>00089 vtkGetObjectMacro(RepelVertices, <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>); <a name="l00091"></a>00091 <a name="l00093"></a><a class="code" href="a00416.html#522c0c51a1ec3baaf31f9ffa0870fd2e">00093</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="a00615.html#b8e72c858969b7032c4f5b5dba4bb685">GetGeodesicLength</a>() { <span class="keywordflow">return</span> 0.0; } <a name="l00094"></a>00094 <a name="l00095"></a>00095 <span class="keyword">protected</span>: <a name="l00096"></a>00096 <a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a>(); <a name="l00097"></a>00097 ~<a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a>(); <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a01261.html#6b5a43ab1f9bbcb368c7dc83e4afe068">RequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *, <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **, <a name="l00100"></a>00100 <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *); <a name="l00101"></a>00101 <a name="l00102"></a>00102 <span class="comment">// Build a graph description of the input.</span> <a name="l00103"></a>00103 <span class="keyword">virtual</span> <span class="keywordtype">void</span> BuildAdjacency( <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *inData ); <a name="l00104"></a>00104 <a name="l00105"></a><a class="code" href="a00416.html#6c3b2637b707dc58864dcb1001ad5a2d">00105</a> <a class="code" href="a01719.html" title="record modification and/or execution time">vtkTimeStamp</a> AdjacencyBuildTime; <a name="l00106"></a>00106 <a name="l00107"></a>00107 <span class="comment">// The fixed cost going from vertex u to v.</span> <a name="l00108"></a>00108 <span class="keyword">virtual</span> <span class="keywordtype">double</span> CalculateStaticEdgeCost( <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *inData, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> u, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> v); <a name="l00109"></a>00109 <a name="l00110"></a>00110 <span class="comment">// The cost going from vertex u to v that may depend on one or more vertices</span> <a name="l00111"></a>00111 <span class="comment">//that precede u.</span> <a name="l00112"></a><a class="code" href="a00416.html#0fc654507362ca8ab425eaf8362876b7">00112</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> CalculateDynamicEdgeCost( <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> , <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> ) <a name="l00113"></a>00113 { <span class="keywordflow">return</span> 0.0; } <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keywordtype">void</span> Initialize( <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *inData ); <a name="l00116"></a>00116 <a name="l00117"></a>00117 <span class="keywordtype">void</span> Reset(); <a name="l00118"></a>00118 <a name="l00119"></a>00119 <span class="comment">// Calculate shortest path from vertex startv to vertex endv.</span> <a name="l00120"></a>00120 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ShortestPath( <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a> *inData, <span class="keywordtype">int</span> startv, <span class="keywordtype">int</span> endv ); <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="comment">// Relax edge u,v with weight w.</span> <a name="l00123"></a>00123 <span class="keywordtype">void</span> Relax(<span class="keyword">const</span> <span class="keywordtype">int</span>& u, <span class="keyword">const</span> <span class="keywordtype">int</span>& v, <span class="keyword">const</span> <span class="keywordtype">double</span>& w); <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="comment">// Backtrace the shortest path</span> <a name="l00126"></a>00126 <span class="keywordtype">void</span> TraceShortestPath( <a class="code" href="a00374.html" title="abstract class to specify dataset behavior">vtkDataSet</a>* inData, <a class="code" href="a01260.html" title="concrete dataset represents vertices, lines, polygons, and triangle strips">vtkPolyData</a>* outPoly, <a name="l00127"></a>00127 <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> startv, <a class="code" href="a02149.html#20bd6b6dedfe1bbb096c50354d52cc7e">vtkIdType</a> endv); <a name="l00128"></a>00128 <a name="l00129"></a>00129 <span class="comment">// The number of vertices.</span> <a name="l00130"></a><a class="code" href="a00416.html#a9360f38c94a38a3d86d60c827cd909b">00130</a> <span class="keywordtype">int</span> NumberOfVertices; <a name="l00131"></a>00131 <a name="l00132"></a>00132 <span class="comment">// The vertex ids on the shortest path.</span> <a name="l00133"></a><a class="code" href="a00416.html#e5f64d45f0ab66e61854b231e251b1aa">00133</a> <a class="code" href="a00720.html" title="list of point or cell ids">vtkIdList</a> *IdList; <a name="l00134"></a>00134 <a name="l00135"></a>00135 <span class="comment">//Internalized STL containers.</span> <a name="l00136"></a><a class="code" href="a00416.html#5d02c562b15515d8c486efd5638af5c6">00136</a> <a class="code" href="a00417.html" title="Helper class due to PIMPL excess.">vtkDijkstraGraphInternals</a> *Internals; <a name="l00137"></a>00137 <a name="l00138"></a><a class="code" href="a00416.html#b30075eae8d356898780956743cea167">00138</a> <span class="keywordtype">int</span> StopWhenEndReached; <a name="l00139"></a><a class="code" href="a00416.html#99f8daaa94fbeda7e69940e0e5d72e9b">00139</a> <span class="keywordtype">int</span> UseScalarWeights; <a name="l00140"></a><a class="code" href="a00416.html#3ab7a73f57a31b4eeeb96e4a22f0d48e">00140</a> <span class="keywordtype">int</span> RepelPathFromVertices; <a name="l00141"></a>00141 <a name="l00142"></a><a class="code" href="a00416.html#1cbac2ab7074d3977f82e8beeced0de5">00142</a> <a class="code" href="a01250.html" title="represent and manipulate 3D points">vtkPoints</a>* RepelVertices; <a name="l00143"></a>00143 <a name="l00144"></a>00144 <span class="keyword">private</span>: <a name="l00145"></a>00145 <a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a>(<span class="keyword">const</span> <a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a>&); <span class="comment">// Not implemented.</span> <a name="l00146"></a>00146 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00416.html" title="Dijkstra algorithm to compute the graph geodesic.">vtkDijkstraGraphGeodesicPath</a>&); <span class="comment">// Not implemented.</span> <a name="l00147"></a>00147 <a name="l00148"></a>00148 }; <a name="l00149"></a>00149 <a name="l00150"></a>00150 <span class="preprocessor">#endif</span> <a name="l00151"></a>00151 <span class="preprocessor"></span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:26 2009 for VTK by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>