VTK  9.7.20260918
vtkDijkstraGraphGeodesicPath.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
56
57#ifndef vtkDijkstraGraphGeodesicPath_h
58#define vtkDijkstraGraphGeodesicPath_h
59
60#include "vtkFiltersModelingModule.h" // For export macro
62
63VTK_ABI_NAMESPACE_BEGIN
64
65class VTKFILTERSMODELING_EXPORT vtkDijkstraGraphGeodesicPath : public vtkGraphGeodesicPath
66{
67public:
72
74
78 void PrintSelf(ostream& os, vtkIndent indent) override;
80
82
85 vtkSetVector3Macro(StartPoint, double);
86 vtkGetVector3Macro(StartPoint, double);
87 vtkSetVector3Macro(EndPoint, double);
88 vtkGetVector3Macro(EndPoint, double);
90
92
98 vtkBooleanMacro(UseNodeIndices, vtkTypeBool);
100
102
108 void SetGraphType(int type);
109 vtkGetMacro(GraphType, int);
111
112protected:
115
117 int FillInputPortInformation(int port, vtkInformation* info) override;
118
120
123 void BuildAdjacency(vtkDataSet* inData) override;
126
128
133 vtkDataSet* inData, vtkDataArray* scalars, vtkIdType u, vtkIdType v);
135
140 vtkDataSet* inData, vtkDataArray* scalars, vtkIdType c1, vtkIdType c2);
141
145 void GetNodeFromIndex(vtkDataSet* inData, vtkIdType u, double pt[3]) override;
146
151
155 void DiscardRepelVertices(vtkDataSet* inData, int startv, int endv) override;
156
161 std::vector<std::map<int, double>>& adjacency, vtkIdType u, vtkIdType v);
162
164
165 double StartPoint[3] = { 0.0, 0.0, 0.0 };
166 double EndPoint[3] = { 0.0, 0.0, 0.0 };
167
169
171
172private:
174 void operator=(const vtkDijkstraGraphGeodesicPath&) = delete;
175};
176
177VTK_ABI_NAMESPACE_END
178#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void BuildCellAdjacency(vtkDataSet *inData)
Builds a graph description of the input.
void SetGraphType(int type)
Set/Get wether the path is compute on the vertices or the cells.
void AddBidirectionalEdge(vtkDataSet *inData, vtkDataArray *scalars, std::vector< std::map< int, double > > &adjacency, vtkIdType u, vtkIdType v)
Add the edge u->v and v->u to the adjacency table.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for printing and determining type information.
void BuildAdjacency(vtkDataSet *inData) override
Builds a graph description of the input.
void GetNodeFromIndex(vtkDataSet *inData, vtkIdType u, double pt[3]) override
Helper to get the node (point or cell) position from its index.
~vtkDijkstraGraphGeodesicPath() override
double CalculateStaticEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v) override
Computes the fixed cost going from vertex u to v.
void DiscardRepelVertices(vtkDataSet *inData, int startv, int endv) override
Helper to discard repelled vertices from the shortest path computation.
double CalculateCellEdgeCost(vtkDataSet *inData, vtkDataArray *scalars, vtkIdType c1, vtkIdType c2)
Computes the fixed cost going from cell c1 to c2.
double CalculateStaticEdgeCost(vtkDataSet *inData, vtkDataArray *scalars, vtkIdType u, vtkIdType v)
Computes the fixed cost going from vertex u to v.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkDijkstraGraphGeodesicPath * New()
Instantiate the class.
vtkIdType GetNumberOfNodes(vtkDataSet *inData) override
Helper to get the number of nodes in the graph.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Allocate and hold a VTK object.
Definition vtkNew.h:168
int vtkTypeBool
Definition vtkABI.h:64
#define vtkDataArray
int vtkIdType
Definition vtkType.h:363