VTK
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkDijkstraGraphGeodesicPath Class Reference

Dijkstra algorithm to compute the graph geodesic. More...

#include <vtkDijkstraGraphGeodesicPath.h>

Inheritance diagram for vtkDijkstraGraphGeodesicPath:
[legend]
Collaboration diagram for vtkDijkstraGraphGeodesicPath:
[legend]

Public Member Functions

virtual double GetGeodesicLength ()
virtual void GetCumulativeWeights (vtkDoubleArray *weights)
virtual vtkIdListGetIdList ()
virtual void SetStopWhenEndReached (int)
virtual int GetStopWhenEndReached ()
virtual void StopWhenEndReachedOn ()
virtual void StopWhenEndReachedOff ()
virtual void SetUseScalarWeights (int)
virtual int GetUseScalarWeights ()
virtual void UseScalarWeightsOn ()
virtual void UseScalarWeightsOff ()
virtual void SetRepelPathFromVertices (int)
virtual int GetRepelPathFromVertices ()
virtual void RepelPathFromVerticesOn ()
virtual void RepelPathFromVerticesOff ()
virtual void SetRepelVertices (vtkPoints *)
virtual vtkPointsGetRepelVertices ()
- Public Member Functions inherited from vtkGraphGeodesicPath
virtual vtkIdType GetStartVertex ()
virtual void SetStartVertex (vtkIdType)
virtual vtkIdType GetEndVertex ()
virtual void SetEndVertex (vtkIdType)
- Public Member Functions inherited from vtkGeodesicPath

Static Public Member Functions

static
vtkDijkstraGraphGeodesicPath
New ()
- Static Public Member Functions inherited from vtkGraphGeodesicPath

Protected Member Functions

 vtkDijkstraGraphGeodesicPath ()
 ~vtkDijkstraGraphGeodesicPath ()
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void BuildAdjacency (vtkDataSet *inData)
virtual double CalculateStaticEdgeCost (vtkDataSet *inData, vtkIdType u, vtkIdType v)
virtual double CalculateDynamicEdgeCost (vtkDataSet *, vtkIdType, vtkIdType)
void Initialize (vtkDataSet *inData)
void Reset ()
virtual void ShortestPath (vtkDataSet *inData, int startv, int endv)
void Relax (const int &u, const int &v, const double &w)
void TraceShortestPath (vtkDataSet *inData, vtkPolyData *outPoly, vtkIdType startv, vtkIdType endv)
- Protected Member Functions inherited from vtkGraphGeodesicPath
 vtkGraphGeodesicPath ()
 ~vtkGraphGeodesicPath ()
- Protected Member Functions inherited from vtkGeodesicPath
 vtkGeodesicPath ()
 ~vtkGeodesicPath ()
virtual int FillInputPortInformation (int port, vtkInformation *info)
- Protected Member Functions inherited from vtkPolyDataAlgorithm
 vtkPolyDataAlgorithm ()
 ~vtkPolyDataAlgorithm ()
virtual int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int FillOutputPortInformation (int port, vtkInformation *info)
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void ExecuteData (vtkDataObject *output)
virtual void Execute ()
- Protected Member Functions inherited from vtkAlgorithm
 vtkAlgorithm ()
 ~vtkAlgorithm ()
virtual void SetNumberOfInputPorts (int n)
virtual void SetNumberOfOutputPorts (int n)
int InputPortIndexInRange (int index, const char *action)
int OutputPortIndexInRange (int index, const char *action)
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
virtual vtkExecutiveCreateDefaultExecutive ()
virtual void ReportReferences (vtkGarbageCollector *)
virtual void SetNumberOfInputConnections (int port, int n)
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
int GetInputArrayAssociation (int idx, vtkDataObject *input)
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
vtkDataArrayGetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
vtkDataArrayGetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input)
vtkDataArrayGetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
vtkAbstractArrayGetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
vtkInformationGetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
virtual void SetErrorCode (unsigned long)
- Protected Member Functions inherited from vtkObject
 vtkObject ()
virtual ~vtkObject ()
virtual void RegisterInternal (vtkObjectBase *, int check)
virtual void UnRegisterInternal (vtkObjectBase *, int check)
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void InternalReleaseFocus ()
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void CollectRevisions (ostream &os)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Protected Attributes

vtkTimeStamp AdjacencyBuildTime
int NumberOfVertices
vtkIdListIdList
vtkDijkstraGraphInternalsInternals
int StopWhenEndReached
int UseScalarWeights
int RepelPathFromVertices
vtkPointsRepelVertices
- Protected Attributes inherited from vtkGraphGeodesicPath
vtkIdType StartVertex
vtkIdType EndVertex
typedef vtkGraphGeodesicPath Superclass
static int IsTypeOf (const char *type)
static
vtkDijkstraGraphGeodesicPath
SafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

Additional Inherited Members

- Public Types inherited from vtkGraphGeodesicPath
typedef vtkGeodesicPath Superclass
- Public Types inherited from vtkGeodesicPath
typedef vtkPolyDataAlgorithm Superclass
- Public Types inherited from vtkPolyDataAlgorithm
typedef vtkAlgorithm Superclass
- Public Attributes inherited from vtkAlgorithm
int AbortExecute
- Static Protected Member Functions inherited from vtkAlgorithm
static vtkInformationIntegerKeyPORT_REQUIREMENTS_FILLED ()
- Static Protected Attributes inherited from vtkAlgorithm
static vtkExecutiveDefaultExecutivePrototype
- Friends inherited from vtkObject

Detailed Description

Dijkstra algorithm to compute the graph geodesic.

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.

Warning
The input polydata must have only triangle cells.
Thanks:
The class was contributed by Rasmus Paulsen. www.imm.dtu.dk/~rrp/VTK . Also thanks to Alexandre Gouaillard and Shoaib Ghias for bug fixes and enhancements.

Definition at line 45 of file vtkDijkstraGraphGeodesicPath.h.

Member Typedef Documentation

Standard methids for printing and determining type information.

Definition at line 55 of file vtkDijkstraGraphGeodesicPath.h.

Constructor & Destructor Documentation

vtkDijkstraGraphGeodesicPath::vtkDijkstraGraphGeodesicPath ( )
protected
vtkDijkstraGraphGeodesicPath::~vtkDijkstraGraphGeodesicPath ( )
protected

Member Function Documentation

static vtkDijkstraGraphGeodesicPath* vtkDijkstraGraphGeodesicPath::New ( )
static

Instantiate the class

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented in vtkDijkstraImageGeodesicPath.

virtual const char* vtkDijkstraGraphGeodesicPath::GetClassName ( )
virtual

Standard methids for printing and determining type information.

Reimplemented from vtkGraphGeodesicPath.

Reimplemented in vtkDijkstraImageGeodesicPath.

static int vtkDijkstraGraphGeodesicPath::IsTypeOf ( const char *  type)
static

Standard methids for printing and determining type information.

Reimplemented from vtkGraphGeodesicPath.

Reimplemented in vtkDijkstraImageGeodesicPath.

virtual int vtkDijkstraGraphGeodesicPath::IsA ( const char *  type)
virtual

Standard methids for printing and determining type information.

Reimplemented from vtkGraphGeodesicPath.

Reimplemented in vtkDijkstraImageGeodesicPath.

static vtkDijkstraGraphGeodesicPath* vtkDijkstraGraphGeodesicPath::SafeDownCast ( vtkObject o)
static

Standard methids for printing and determining type information.

Reimplemented from vtkGraphGeodesicPath.

Reimplemented in vtkDijkstraImageGeodesicPath.

void vtkDijkstraGraphGeodesicPath::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Standard methids for printing and determining type information.

Reimplemented from vtkGraphGeodesicPath.

Reimplemented in vtkDijkstraImageGeodesicPath.

virtual vtkIdList* vtkDijkstraGraphGeodesicPath::GetIdList ( )
virtual

The vertex ids (of the input polydata) on the shortest path

virtual void vtkDijkstraGraphGeodesicPath::SetStopWhenEndReached ( int  )
virtual

Stop when the end vertex is reached or calculate shortest path to all vertices

virtual int vtkDijkstraGraphGeodesicPath::GetStopWhenEndReached ( )
virtual

Stop when the end vertex is reached or calculate shortest path to all vertices

virtual void vtkDijkstraGraphGeodesicPath::StopWhenEndReachedOn ( )
virtual

Stop when the end vertex is reached or calculate shortest path to all vertices

virtual void vtkDijkstraGraphGeodesicPath::StopWhenEndReachedOff ( )
virtual

Stop when the end vertex is reached or calculate shortest path to all vertices

virtual void vtkDijkstraGraphGeodesicPath::SetUseScalarWeights ( int  )
virtual

Use scalar values in the edge weight (experimental)

virtual int vtkDijkstraGraphGeodesicPath::GetUseScalarWeights ( )
virtual

Use scalar values in the edge weight (experimental)

virtual void vtkDijkstraGraphGeodesicPath::UseScalarWeightsOn ( )
virtual

Use scalar values in the edge weight (experimental)

virtual void vtkDijkstraGraphGeodesicPath::UseScalarWeightsOff ( )
virtual

Use scalar values in the edge weight (experimental)

virtual void vtkDijkstraGraphGeodesicPath::SetRepelPathFromVertices ( int  )
virtual

Use the input point to repel the path by assigning high costs.

virtual int vtkDijkstraGraphGeodesicPath::GetRepelPathFromVertices ( )
virtual

Use the input point to repel the path by assigning high costs.

virtual void vtkDijkstraGraphGeodesicPath::RepelPathFromVerticesOn ( )
virtual

Use the input point to repel the path by assigning high costs.

virtual void vtkDijkstraGraphGeodesicPath::RepelPathFromVerticesOff ( )
virtual

Use the input point to repel the path by assigning high costs.

virtual void vtkDijkstraGraphGeodesicPath::SetRepelVertices ( vtkPoints )
virtual

Specify vtkPoints to use to repel the path from.

virtual vtkPoints* vtkDijkstraGraphGeodesicPath::GetRepelVertices ( )
virtual

Specify vtkPoints to use to repel the path from.

virtual double vtkDijkstraGraphGeodesicPath::GetGeodesicLength ( )
inlinevirtual

TODO: Get the total geodesic length.

Implements vtkGeodesicPath.

Definition at line 93 of file vtkDijkstraGraphGeodesicPath.h.

virtual void vtkDijkstraGraphGeodesicPath::GetCumulativeWeights ( vtkDoubleArray weights)
virtual

Fill the array with the cumulative weights.

virtual int vtkDijkstraGraphGeodesicPath::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
)
protectedvirtual

This is called by the superclass. This is the method you should override.

Reimplemented from vtkPolyDataAlgorithm.

Reimplemented in vtkDijkstraImageGeodesicPath.

virtual void vtkDijkstraGraphGeodesicPath::BuildAdjacency ( vtkDataSet inData)
protectedvirtual

Reimplemented in vtkDijkstraImageGeodesicPath.

virtual double vtkDijkstraGraphGeodesicPath::CalculateStaticEdgeCost ( vtkDataSet inData,
vtkIdType  u,
vtkIdType  v 
)
protectedvirtual

Reimplemented in vtkDijkstraImageGeodesicPath.

virtual double vtkDijkstraGraphGeodesicPath::CalculateDynamicEdgeCost ( vtkDataSet ,
vtkIdType  ,
vtkIdType   
)
inlineprotectedvirtual

Reimplemented in vtkDijkstraImageGeodesicPath.

Definition at line 115 of file vtkDijkstraGraphGeodesicPath.h.

void vtkDijkstraGraphGeodesicPath::Initialize ( vtkDataSet inData)
protected
void vtkDijkstraGraphGeodesicPath::Reset ( )
protected
virtual void vtkDijkstraGraphGeodesicPath::ShortestPath ( vtkDataSet inData,
int  startv,
int  endv 
)
protectedvirtual
void vtkDijkstraGraphGeodesicPath::Relax ( const int &  u,
const int &  v,
const double &  w 
)
protected
void vtkDijkstraGraphGeodesicPath::TraceShortestPath ( vtkDataSet inData,
vtkPolyData outPoly,
vtkIdType  startv,
vtkIdType  endv 
)
protected

Member Data Documentation

vtkTimeStamp vtkDijkstraGraphGeodesicPath::AdjacencyBuildTime
protected

Definition at line 108 of file vtkDijkstraGraphGeodesicPath.h.

int vtkDijkstraGraphGeodesicPath::NumberOfVertices
protected

Definition at line 133 of file vtkDijkstraGraphGeodesicPath.h.

vtkIdList* vtkDijkstraGraphGeodesicPath::IdList
protected

Definition at line 136 of file vtkDijkstraGraphGeodesicPath.h.

vtkDijkstraGraphInternals* vtkDijkstraGraphGeodesicPath::Internals
protected

Definition at line 139 of file vtkDijkstraGraphGeodesicPath.h.

int vtkDijkstraGraphGeodesicPath::StopWhenEndReached
protected

Definition at line 141 of file vtkDijkstraGraphGeodesicPath.h.

int vtkDijkstraGraphGeodesicPath::UseScalarWeights
protected

Definition at line 142 of file vtkDijkstraGraphGeodesicPath.h.

int vtkDijkstraGraphGeodesicPath::RepelPathFromVertices
protected

Definition at line 143 of file vtkDijkstraGraphGeodesicPath.h.

vtkPoints* vtkDijkstraGraphGeodesicPath::RepelVertices
protected

Definition at line 145 of file vtkDijkstraGraphGeodesicPath.h.


The documentation for this class was generated from the following file: