[vtkusers] about vtkDijkstraGraphGeodesicPath

David Doria daviddoria+vtk at gmail.com
Wed May 19 13:24:34 EDT 2010


Karthik seems to have answered your question, but I have some comments
on your existing code:

Karthik - when you commit this, can you update the example to match/demonstrate?

Dajiang - See inline below:

On Wed, May 19, 2010 at 1:14 PM, Dajiang Zhu <djzhu at uga.edu> wrote:
> oh, Thanks, I got nothing because I went to a wrong place:
> http://www.vtk.org/Wiki/VTK/Examples/Graph/DijkstraGraphGeodesicPath

Where did you find that link? Was it just a mistake? Or does a link
need to be fixed somewhere?

>
> vtkPolyDataReader* TReader=vtkPolyDataReader::New();

I highly recommend you use smart pointers:
http://www.vtk.org/Wiki/VTK/Tutorials/SmartPointers

vtkSmartPointer<vtkPolyDataReader> TReader =
  vtkSmartPointer<vtkPolyDataReader>::New();

>     vtkPolyData* TsurfaceData=vtkPolyData::New();
>     TsurfaceData=TReader->GetOutput();

You should NOT create an object before assigning the output of the reader.

Instead, simply do:
vtkPolyData* TsurfaceData = TReader->GetOutput();

Good luck,

David



More information about the vtkusers mailing list