VTK  9.2.6
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=========================================================================*/
39#ifndef vtkDijkstraGraphGeodesicPath_h
40#define vtkDijkstraGraphGeodesicPath_h
41
42#include "vtkFiltersModelingModule.h" // For export macro
44
46class vtkIdList;
47
48class VTKFILTERSMODELING_EXPORT vtkDijkstraGraphGeodesicPath : public vtkGraphGeodesicPath
49{
50public:
55
57
61 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
68 vtkGetObjectMacro(IdList, vtkIdList);
70
72
76 vtkSetMacro(StopWhenEndReached, vtkTypeBool);
77 vtkGetMacro(StopWhenEndReached, vtkTypeBool);
78 vtkBooleanMacro(StopWhenEndReached, vtkTypeBool);
80
82
85 vtkSetMacro(UseScalarWeights, vtkTypeBool);
86 vtkGetMacro(UseScalarWeights, vtkTypeBool);
87 vtkBooleanMacro(UseScalarWeights, vtkTypeBool);
89
91
94 vtkSetMacro(RepelPathFromVertices, vtkTypeBool);
95 vtkGetMacro(RepelPathFromVertices, vtkTypeBool);
96 vtkBooleanMacro(RepelPathFromVertices, vtkTypeBool);
98
100
104 vtkGetObjectMacro(RepelVertices, vtkPoints);
106
110 virtual void GetCumulativeWeights(vtkDoubleArray* weights);
111
112protected:
115
117
118 // Build a graph description of the input.
119 virtual void BuildAdjacency(vtkDataSet* inData);
120
122
123 // The fixed cost going from vertex u to v.
125
126 // The cost going from vertex u to v that may depend on one or more vertices
127 // that precede u.
128 virtual double CalculateDynamicEdgeCost(vtkDataSet*, vtkIdType, vtkIdType) { return 0.0; }
129
130 void Initialize(vtkDataSet* inData);
131
132 void Reset();
133
134 // Calculate shortest path from vertex startv to vertex endv.
135 virtual void ShortestPath(vtkDataSet* inData, int startv, int endv);
136
137 // Relax edge u,v with weight w.
138 void Relax(const int& u, const int& v, const double& w);
139
140 // Backtrace the shortest path
142 vtkDataSet* inData, vtkPolyData* outPoly, vtkIdType startv, vtkIdType endv);
143
144 // The number of vertices.
146
147 // The vertex ids on the shortest path.
149
150 // Internalized STL containers.
152
156
158
159private:
161 void operator=(const vtkDijkstraGraphGeodesicPath&) = delete;
162};
163
164#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
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)
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:31
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:34
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
record modification and/or execution time
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332