VTK
Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkDijkstraImageGeodesicPath Class Reference

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

#include <vtkDijkstraImageGeodesicPath.h>

Inheritance diagram for vtkDijkstraImageGeodesicPath:
Inheritance graph
[legend]
Collaboration diagram for vtkDijkstraImageGeodesicPath:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetInputData (vtkDataObject *)
vtkImageDataGetInputAsImageData ()
void SetImageWeight (double)
virtual double GetImageWeight ()
void SetEdgeLengthWeight (double)
virtual double GetEdgeLengthWeight ()
virtual void SetCurvatureWeight (double)
virtual double GetCurvatureWeight ()

Static Public Member Functions

static
vtkDijkstraImageGeodesicPath
New ()

Protected Member Functions

 vtkDijkstraImageGeodesicPath ()
 ~vtkDijkstraImageGeodesicPath ()
virtual int FillInputPortInformation (int port, vtkInformation *info)
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void BuildAdjacency (vtkDataSet *inData)
void UpdateStaticCosts (vtkImageData *image)
virtual double CalculateStaticEdgeCost (vtkDataSet *inData, vtkIdType u, vtkIdType v)
virtual double CalculateDynamicEdgeCost (vtkDataSet *inData, vtkIdType u, vtkIdType v)

Protected Attributes

double PixelSize
double ImageWeight
double EdgeLengthWeight
double CurvatureWeight
bool RebuildStaticCosts
typedef
vtkDijkstraGraphGeodesicPath 
Superclass
static int IsTypeOf (const char *type)
static
vtkDijkstraImageGeodesicPath
SafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkDijkstraImageGeodesicPathNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

Detailed Description

Dijkstra algorithm to compute the graph geodesic.

Takes as input a polyline and an image representing a 2D cost function 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. See parent class vtkDijkstraGraphGeodesicPath for the implementation.

Warning:
The input cost image must have only VTK_PIXEL cells: i.e., a 2D image or slice of a 3D volume. A cost function for a gray scale image might be generated by the following pipeline: vtkImageData->vtkImageGradientMagnitude->vtkImageShiftScale wherein the gradient magnitude image is inverted so that strong edges have low cost value. Costs in moving from a vertex v to a vertex u are calculated using a weighted additive sheme: cost = Iw*f(I) + Ew*f(u,v) + Cw*f(t,u,v) where Iw is the weight associated with f(I): the normalized image cost, Ew is the weight associated with f(u,v): the normalized distance between vertices u and v, and Cw is the weight associated with f(t,u,v): the normalized curvature calculated from the vertex t which precedes vertex u, and vertices u and v. All weights range from 0 to 1.
Thanks:
The class was contributed by Dean Inglis.
Tests:
vtkDijkstraImageGeodesicPath (Tests)

Definition at line 60 of file vtkDijkstraImageGeodesicPath.h.


Member Typedef Documentation

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

Definition at line 70 of file vtkDijkstraImageGeodesicPath.h.


Constructor & Destructor Documentation


Member Function Documentation

Instantiate the class

Reimplemented from vtkDijkstraGraphGeodesicPath.

static int vtkDijkstraImageGeodesicPath::IsTypeOf ( const char *  type) [static]

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

virtual int vtkDijkstraImageGeodesicPath::IsA ( const char *  type) [virtual]

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

virtual vtkObjectBase* vtkDijkstraImageGeodesicPath::NewInstanceInternal ( ) const [protected, virtual]

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

void vtkDijkstraImageGeodesicPath::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

Specify the image object which is used as a cost function.

Reimplemented from vtkPolyDataAlgorithm.

Specify the image object which is used as a cost function.

Image cost weight.

Image cost weight.

Edge length cost weight.

Edge length cost weight.

Curvature cost weight.

Curvature cost weight.

virtual int vtkDijkstraImageGeodesicPath::FillInputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkGeodesicPath.

virtual int vtkDijkstraImageGeodesicPath::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

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

Reimplemented from vtkDijkstraGraphGeodesicPath.

virtual void vtkDijkstraImageGeodesicPath::BuildAdjacency ( vtkDataSet inData) [protected, virtual]

Reimplemented from vtkDijkstraGraphGeodesicPath.

virtual double vtkDijkstraImageGeodesicPath::CalculateStaticEdgeCost ( vtkDataSet inData,
vtkIdType  u,
vtkIdType  v 
) [protected, virtual]

Reimplemented from vtkDijkstraGraphGeodesicPath.

virtual double vtkDijkstraImageGeodesicPath::CalculateDynamicEdgeCost ( vtkDataSet inData,
vtkIdType  u,
vtkIdType  v 
) [protected, virtual]

Reimplemented from vtkDijkstraGraphGeodesicPath.


Member Data Documentation

Definition at line 116 of file vtkDijkstraImageGeodesicPath.h.

Definition at line 117 of file vtkDijkstraImageGeodesicPath.h.

Definition at line 118 of file vtkDijkstraImageGeodesicPath.h.

Definition at line 119 of file vtkDijkstraImageGeodesicPath.h.

Definition at line 120 of file vtkDijkstraImageGeodesicPath.h.


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