VTK
vtkDijkstraGraphGeodesicPath.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDijkstraGraphGeodesicPath.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
37 #ifndef vtkDijkstraGraphGeodesicPath_h
38 #define vtkDijkstraGraphGeodesicPath_h
39 
40 #include "vtkFiltersModelingModule.h" // For export macro
41 #include "vtkGraphGeodesicPath.h"
42 
44 class vtkIdList;
45 
48 {
49 public:
50 
53 
55 
57  void PrintSelf(ostream& os, vtkIndent indent);
59 
61 
64 
66 
68  vtkSetMacro(StopWhenEndReached, int);
69  vtkGetMacro(StopWhenEndReached, int);
70  vtkBooleanMacro(StopWhenEndReached, int);
72 
74 
75  vtkSetMacro(UseScalarWeights, int);
76  vtkGetMacro(UseScalarWeights, int);
77  vtkBooleanMacro(UseScalarWeights, int);
79 
81 
82  vtkSetMacro(RepelPathFromVertices, int);
83  vtkGetMacro(RepelPathFromVertices, int);
84  vtkBooleanMacro(RepelPathFromVertices, int);
86 
88 
89  virtual void SetRepelVertices(vtkPoints*);
90  vtkGetObjectMacro(RepelVertices, vtkPoints);
92 
95 
96 protected:
99 
102 
103  // Build a graph description of the input.
104  virtual void BuildAdjacency( vtkDataSet *inData );
105 
107 
108  // The fixed cost going from vertex u to v.
110 
111  // The cost going from vertex u to v that may depend on one or more vertices
112  //that precede u.
114  { return 0.0; }
115 
116  void Initialize( vtkDataSet *inData );
117 
118  void Reset();
119 
120  // Calculate shortest path from vertex startv to vertex endv.
121  virtual void ShortestPath( vtkDataSet *inData, int startv, int endv );
122 
123  // Relax edge u,v with weight w.
124  void Relax(const int& u, const int& v, const double& w);
125 
126  // Backtrace the shortest path
127  void TraceShortestPath( vtkDataSet* inData, vtkPolyData* outPoly,
128  vtkIdType startv, vtkIdType endv);
129 
130  // The number of vertices.
132 
133  // The vertex ids on the shortest path.
135 
136  //Internalized STL containers.
138 
142 
144 
145 private:
147  void operator=(const vtkDijkstraGraphGeodesicPath&); // Not implemented.
148 
149 };
150 
151 #endif
152 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkDijkstraGraphGeodesicPath::~vtkDijkstraGraphGeodesicPath
~vtkDijkstraGraphGeodesicPath()
vtkGraphGeodesicPath
Abstract base for classes that generate a geodesic path on a graph (mesh).
Definition: vtkGraphGeodesicPath.h:32
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkgl::weights
const GLbyte * weights
Definition: vtkgl.h:12766
vtkDijkstraGraphGeodesicPath::AdjacencyBuildTime
vtkTimeStamp AdjacencyBuildTime
Definition: vtkDijkstraGraphGeodesicPath.h:106
vtkDijkstraGraphGeodesicPath::Reset
void Reset()
vtkDijkstraGraphGeodesicPath::UseScalarWeights
int UseScalarWeights
Definition: vtkDijkstraGraphGeodesicPath.h:140
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkDijkstraGraphGeodesicPath::GetCumulativeWeights
virtual void GetCumulativeWeights(vtkDoubleArray *weights)
vtkDijkstraGraphGeodesicPath::StopWhenEndReached
int StopWhenEndReached
Definition: vtkDijkstraGraphGeodesicPath.h:139
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkFiltersModelingModule.h
vtkDijkstraGraphGeodesicPath::CalculateDynamicEdgeCost
virtual double CalculateDynamicEdgeCost(vtkDataSet *, vtkIdType, vtkIdType)
Definition: vtkDijkstraGraphGeodesicPath.h:113
vtkDijkstraGraphGeodesicPath::TraceShortestPath
void TraceShortestPath(vtkDataSet *inData, vtkPolyData *outPoly, vtkIdType startv, vtkIdType endv)
vtkDijkstraGraphGeodesicPath::ShortestPath
virtual void ShortestPath(vtkDataSet *inData, int startv, int endv)
vtkDijkstraGraphGeodesicPath::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDijkstraGraphGeodesicPath::IdList
vtkIdList * IdList
Definition: vtkDijkstraGraphGeodesicPath.h:134
vtkDijkstraGraphGeodesicPath::NumberOfVertices
int NumberOfVertices
Definition: vtkDijkstraGraphGeodesicPath.h:131
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkDijkstraGraphGeodesicPath::Initialize
void Initialize(vtkDataSet *inData)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDijkstraGraphGeodesicPath::Relax
void Relax(const int &u, const int &v, const double &w)
vtkDijkstraGraphGeodesicPath::RepelPathFromVertices
int RepelPathFromVertices
Definition: vtkDijkstraGraphGeodesicPath.h:141
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkDijkstraGraphGeodesicPath::SetRepelVertices
virtual void SetRepelVertices(vtkPoints *)
vtkDijkstraGraphGeodesicPath::CalculateStaticEdgeCost
virtual double CalculateStaticEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v)
vtkGraphGeodesicPath.h
vtkDijkstraGraphGeodesicPath::RepelVertices
vtkPoints * RepelVertices
Definition: vtkDijkstraGraphGeodesicPath.h:143
vtkDijkstraGraphGeodesicPath::BuildAdjacency
virtual void BuildAdjacency(vtkDataSet *inData)
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
VTKFILTERSMODELING_EXPORT
#define VTKFILTERSMODELING_EXPORT
Definition: vtkFiltersModelingModule.h:15
vtkDijkstraGraphGeodesicPath
Dijkstra algorithm to compute the graph geodesic.
Definition: vtkDijkstraGraphGeodesicPath.h:48
vtkDijkstraGraphInternals
Helper class due to PIMPL excess.
Definition: vtkDijkstraGraphInternals.h:32
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:49
vtkDijkstraGraphGeodesicPath::Internals
vtkDijkstraGraphInternals * Internals
Definition: vtkDijkstraGraphGeodesicPath.h:137
vtkgl::w
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
vtkDijkstraGraphGeodesicPath::vtkDijkstraGraphGeodesicPath
vtkDijkstraGraphGeodesicPath()
vtkDijkstraGraphGeodesicPath::New
static vtkDijkstraGraphGeodesicPath * New()
vtkDijkstraGraphGeodesicPath::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)