<div class="gmail_quote">On Wed, May 19, 2010 at 10:44 PM, Dajiang Zhu <span dir="ltr">&lt;<a href="mailto:djzhu@uga.edu">djzhu@uga.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
oh, Thanks, I got nothing because I went to a wrong place: <a href="http://www.vtk.org/Wiki/VTK/Examples/" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/</a><span style="color: rgb(255, 0, 0);">Graph</span>/DijkstraGraphGeodesicPath <br>

Anyway, below is part of my test code, it seems does not work at all: the length is always 0 :(<br><br><br>Any comment? <br></blockquote><div><br><br>TestDijkstraGraphGeodesicPath.cxx illustrates its usage, (although
interactively) through a contour widget, which traces shortest path
curves along the surface of a mesh.<br>
<br><br>
Now, to get the geodesic distance between two points, I have
not implemented method GetGeodesicLength() to get the length between
the source and target point. I have left a TODO message in vtkDijkstraGraphGeodesicPath.h.<br>
<br>
  // Description:<br>
  // TODO: Get the total geodesic length.<br>
  virtual double GetGeodesicLength() { return 0.0; }<br>
<br>
<br>Not to worry though, since you can use the method GetCumulativeWeights(). This method gets the <span class="il">geodesic</span> <span class="il">distance</span> at all vertices of the graph.<br><br>  //Description:<br>

  //Fill the array with the cumulative weights.<br>
  virtual void GetCumulativeWeights(vtkDoubleArray *weights);<br><br><br>Actually its quite simple really to add the implementation GetGeodesicLength() to compute the geodesic length to the specific vertex in question. (Simply need to query the latter method for a specific index), but I haven&#39;t yet gotten down to committing with git. Will do so in the near future. In the meantime, you have this solution. I&#39;ll also add better documentation<br>
<br>Thanks<br>--<br>karthik<br><br><br></div></div><br>