FreeMat

- Main Page
- Related Pages

vtkDijkstraGraphGeodesicPath

Section: Visualization Toolkit Graphics Classes

# Usage

Takes as input a polygonal mesh and performs a single source shortest path calculation. Dijkstra's algorithm is used. The implementation is similar to the one described in Introduction to Algorithms (Second Edition) by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Cliff Stein, published by MIT Press and McGraw-Hill. Some minor enhancement are added though. All vertices are not pushed on the heap at start, instead a front set is maintained. The heap is implemented as a binary heap. The output of the filter is a set of lines describing the shortest path from StartVertex to EndVertex.

To create an instance of class vtkDijkstraGraphGeodesicPath, simply invoke its constructor as follows

      obj = vtkDijkstraGraphGeodesicPath

# Methods

The class vtkDijkstraGraphGeodesicPath has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkDijkstraGraphGeodesicPath class.

- `string = obj.GetClassName ()` - Standard methids for printing and determining type information.
- `int = obj.IsA (string name)` - Standard methids for printing and determining type information.
- `vtkDijkstraGraphGeodesicPath = obj.NewInstance ()` - Standard methids for printing and determining type information.
- `vtkDijkstraGraphGeodesicPath = obj.SafeDownCast (vtkObject o)` - Standard methids for printing and determining type information.
- `vtkIdList = obj.GetIdList ()` - The vertex ids (of the input polydata) on the shortest path
- `obj.SetStopWhenEndReached (int )` - Stop when the end vertex is reached or calculate shortest path to all vertices
- `int = obj.GetStopWhenEndReached ()` - Stop when the end vertex is reached or calculate shortest path to all vertices
- `obj.StopWhenEndReachedOn ()` - Stop when the end vertex is reached or calculate shortest path to all vertices
- `obj.StopWhenEndReachedOff ()` - Stop when the end vertex is reached or calculate shortest path to all vertices
- `obj.SetUseScalarWeights (int )` - Use scalar values in the edge weight (experimental)
- `int = obj.GetUseScalarWeights ()` - Use scalar values in the edge weight (experimental)
- `obj.UseScalarWeightsOn ()` - Use scalar values in the edge weight (experimental)
- `obj.UseScalarWeightsOff ()` - Use scalar values in the edge weight (experimental)
- `obj.SetRepelPathFromVertices (int )` - Use the input point to repel the path by assigning high costs.
- `int = obj.GetRepelPathFromVertices ()` - Use the input point to repel the path by assigning high costs.
- `obj.RepelPathFromVerticesOn ()` - Use the input point to repel the path by assigning high costs.
- `obj.RepelPathFromVerticesOff ()` - Use the input point to repel the path by assigning high costs.
- `obj.SetRepelVertices (vtkPoints )` - Specify vtkPoints to use to repel the path from.
- `vtkPoints = obj.GetRepelVertices ()` - Specify vtkPoints to use to repel the path from.
- `double = obj.GetGeodesicLength ()`
- `obj.GetCumulativeWeights (vtkDoubleArray weights)`