[vtkusers] problem with vtkDijkstraGraphGeodesicPath() and vtkXMLPolyDataReader output
RimAY
rim.ayari at gmail.com
Tue Oct 20 05:45:45 EDT 2009
Dear All ,
I try to get the shortest path between two cell in a vtk image, then trace
it with vtkTubeFilter(). I read the vtk file and get the output of the
vtkXMLPolyDataReader(). then I choose two cell: start_point and end_point to
find the shortest path between them. My problem is that I got always the
error:
vtkTubeFilter (0F432C08): Less than two points in line! or
I use the same code with the vtkSphereSource output and it work.
this is a part of my code:
readerVTK = vtkXMLPolyDataReader()
readerVTK.SetFileName("file")
readerVTK.Update()
data = vtkPolyData()
data = readerVTK.GetOutput()
data.Update()
geodesic = vtk.vtkDijkstraGraphGeodesicPath()
geodesic.SetInput(data)
geodesic.SetStartVertex( start_point )
geodesic.SetEndVertex( end_point )
geodesic.Update()
points = vtkPolyData()
points = geodesic.GetOutput()
tube = vtk.vtkTubeFilter()
tube.SetInput(points)
tube.SetRadius(1.5)
tube.Update()
tubeMapper = vtkPolyDataMapper()
tubeMapper.SetInputConnection(tube.GetOutputPort())
Any help will be very appreciated
Best Regards
--
View this message in context: http://www.nabble.com/problem-with-vtkDijkstraGraphGeodesicPath%28%29-and-vtkXMLPolyDataReader-output-tp25972428p25972428.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list