vtkDijkstraImageGeodesicPath Class Reference

#include <vtkDijkstraImageGeodesicPath.h>

Inheritance diagram for vtkDijkstraImageGeodesicPath:

Inheritance graph
[legend]
Collaboration diagram for vtkDijkstraImageGeodesicPath:

Collaboration graph
[legend]

List of all members.


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 59 of file vtkDijkstraImageGeodesicPath.h.

typedef
vtkDijkstraGraphGeodesicPath 
Superclass
static int IsTypeOf (const char *type)
static
vtkDijkstraImageGeodesicPath
SafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

Public Member Functions

void SetInput (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

Member Typedef Documentation

Standard methids for printing and determining type information.

Reimplemented from vtkDijkstraGraphGeodesicPath.

Definition at line 69 of file vtkDijkstraImageGeodesicPath.h.


Constructor & Destructor Documentation

vtkDijkstraImageGeodesicPath::vtkDijkstraImageGeodesicPath (  )  [protected]

vtkDijkstraImageGeodesicPath::~vtkDijkstraImageGeodesicPath (  )  [protected]


Member Function Documentation

static vtkDijkstraImageGeodesicPath* vtkDijkstraImageGeodesicPath::New (  )  [static]

Instantiate the class

Reimplemented from vtkDijkstraGraphGeodesicPath.

virtual const char* vtkDijkstraImageGeodesicPath::GetClassName (  )  [virtual]

Standard methids for printing and determining type information.

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.

static vtkDijkstraImageGeodesicPath* vtkDijkstraImageGeodesicPath::SafeDownCast ( vtkObject o  )  [static]

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.

void vtkDijkstraImageGeodesicPath::SetInput ( vtkDataObject  ) 

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

Reimplemented from vtkPolyDataAlgorithm.

vtkImageData* vtkDijkstraImageGeodesicPath::GetInputAsImageData (  ) 

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

void vtkDijkstraImageGeodesicPath::SetImageWeight ( double   ) 

Image cost weight.

virtual double vtkDijkstraImageGeodesicPath::GetImageWeight (  )  [virtual]

Image cost weight.

void vtkDijkstraImageGeodesicPath::SetEdgeLengthWeight ( double   ) 

Edge length cost weight.

virtual double vtkDijkstraImageGeodesicPath::GetEdgeLengthWeight (  )  [virtual]

Edge length cost weight.

virtual void vtkDijkstraImageGeodesicPath::SetCurvatureWeight ( double   )  [virtual]

Curvature cost weight.

virtual double vtkDijkstraImageGeodesicPath::GetCurvatureWeight (  )  [virtual]

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.

void vtkDijkstraImageGeodesicPath::UpdateStaticCosts ( vtkImageData image  )  [protected]

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 115 of file vtkDijkstraImageGeodesicPath.h.

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.


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

Generated on Mon Sep 27 18:22:10 2010 for VTK by  doxygen 1.5.6