VTK  9.1.0
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=========================================================================*/
48#ifndef vtkDijkstraGraphGeodesicPath_h
49#define vtkDijkstraGraphGeodesicPath_h
50
51#include "vtkFiltersModelingModule.h" // For export macro
53
55class vtkIdList;
56
57class VTKFILTERSMODELING_EXPORT vtkDijkstraGraphGeodesicPath : public vtkGraphGeodesicPath
58{
59public:
64
66
70 void PrintSelf(ostream& os, vtkIndent indent) override;
72
74
77 vtkGetObjectMacro(IdList, vtkIdList);
79
81
85 vtkSetMacro(StopWhenEndReached, vtkTypeBool);
86 vtkGetMacro(StopWhenEndReached, vtkTypeBool);
87 vtkBooleanMacro(StopWhenEndReached, vtkTypeBool);
89
91
94 vtkSetMacro(UseScalarWeights, vtkTypeBool);
95 vtkGetMacro(UseScalarWeights, vtkTypeBool);
96 vtkBooleanMacro(UseScalarWeights, vtkTypeBool);
98
100
103 vtkSetMacro(RepelPathFromVertices, vtkTypeBool);
104 vtkGetMacro(RepelPathFromVertices, vtkTypeBool);
105 vtkBooleanMacro(RepelPathFromVertices, vtkTypeBool);
107
109
113 vtkGetObjectMacro(RepelVertices, vtkPoints);
115
119 virtual void GetCumulativeWeights(vtkDoubleArray* weights);
120
121protected:
124
126
127 // Build a graph description of the input.
128 virtual void BuildAdjacency(vtkDataSet* inData);
129
131
132 // The fixed cost going from vertex u to v.
134
135 // The cost going from vertex u to v that may depend on one or more vertices
136 // that precede u.
137 virtual double CalculateDynamicEdgeCost(vtkDataSet*, vtkIdType, vtkIdType) { return 0.0; }
138
139 void Initialize(vtkDataSet* inData);
140
141 void Reset();
142
143 // Calculate shortest path from vertex startv to vertex endv.
144 virtual void ShortestPath(vtkDataSet* inData, int startv, int endv);
145
146 // Relax edge u,v with weight w.
147 void Relax(const int& u, const int& v, const double& w);
148
149 // Backtrace the shortest path
151 vtkDataSet* inData, vtkPolyData* outPoly, vtkIdType startv, vtkIdType endv);
152
153 // The number of vertices.
155
156 // The vertex ids on the shortest path.
158
159 // Internalized STL containers.
161
165
167
168private:
170 void operator=(const vtkDijkstraGraphGeodesicPath&) = delete;
171};
172
173#endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:66
Dijkstra algorithm to compute the graph geodesic.
virtual double CalculateDynamicEdgeCost(vtkDataSet *, vtkIdType, vtkIdType)
virtual void SetRepelVertices(vtkPoints *)
Specify vtkPoints to use to repel the path from.
void Initialize(vtkDataSet *inData)
void TraceShortestPath(vtkDataSet *inData, vtkPolyData *outPoly, vtkIdType startv, vtkIdType endv)
virtual void BuildAdjacency(vtkDataSet *inData)
vtkDijkstraGraphInternals * Internals
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for printing and determining type information.
void Relax(const int &u, const int &v, const double &w)
~vtkDijkstraGraphGeodesicPath() override
virtual double CalculateStaticEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v)
virtual void GetCumulativeWeights(vtkDoubleArray *weights)
Fill the array with the cumulative weights.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkDijkstraGraphGeodesicPath * New()
Instantiate the class.
virtual void ShortestPath(vtkDataSet *inData, int startv, int endv)
Helper class due to PIMPL excess.
dynamic, self-adjusting array of double
Abstract base for classes that generate a geodesic path on a graph (mesh).
list of point or cell ids
Definition: vtkIdList.h:40
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:43
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
record modification and/or execution time
Definition: vtkTimeStamp.h:42
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332