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 =========================================================================*/
38 #ifndef vtkDijkstraGraphGeodesicPath_h
39 #define vtkDijkstraGraphGeodesicPath_h
40 
41 #include "vtkFiltersModelingModule.h" // For export macro
42 #include "vtkGraphGeodesicPath.h"
43 
45 class vtkIdList;
46 
47 class VTKFILTERSMODELING_EXPORT vtkDijkstraGraphGeodesicPath :
49 {
50 public:
51 
56 
58 
62  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
69  vtkGetObjectMacro(IdList, vtkIdList);
71 
73 
77  vtkSetMacro(StopWhenEndReached, vtkTypeBool);
78  vtkGetMacro(StopWhenEndReached, vtkTypeBool);
79  vtkBooleanMacro(StopWhenEndReached, vtkTypeBool);
81 
83 
86  vtkSetMacro(UseScalarWeights, vtkTypeBool);
87  vtkGetMacro(UseScalarWeights, vtkTypeBool);
88  vtkBooleanMacro(UseScalarWeights, vtkTypeBool);
90 
92 
95  vtkSetMacro(RepelPathFromVertices, vtkTypeBool);
96  vtkGetMacro(RepelPathFromVertices, vtkTypeBool);
97  vtkBooleanMacro(RepelPathFromVertices, vtkTypeBool);
99 
101 
104  virtual void SetRepelVertices(vtkPoints*);
105  vtkGetObjectMacro(RepelVertices, vtkPoints);
107 
111  virtual void GetCumulativeWeights(vtkDoubleArray *weights);
112 
113 protected:
115  ~vtkDijkstraGraphGeodesicPath() override;
116 
118  vtkInformationVector *) override;
119 
120  // Build a graph description of the input.
121  virtual void BuildAdjacency( vtkDataSet *inData );
122 
124 
125  // The fixed cost going from vertex u to v.
126  virtual double CalculateStaticEdgeCost( vtkDataSet *inData, vtkIdType u, vtkIdType v);
127 
128  // The cost going from vertex u to v that may depend on one or more vertices
129  //that precede u.
131  { return 0.0; }
132 
133  void Initialize( vtkDataSet *inData );
134 
135  void Reset();
136 
137  // Calculate shortest path from vertex startv to vertex endv.
138  virtual void ShortestPath( vtkDataSet *inData, int startv, int endv );
139 
140  // Relax edge u,v with weight w.
141  void Relax(const int& u, const int& v, const double& w);
142 
143  // Backtrace the shortest path
144  void TraceShortestPath( vtkDataSet* inData, vtkPolyData* outPoly,
145  vtkIdType startv, vtkIdType endv);
146 
147  // The number of vertices.
149 
150  // The vertex ids on the shortest path.
152 
153  //Internalized STL containers.
155 
159 
161 
162 private:
164  void operator=(const vtkDijkstraGraphGeodesicPath&) = delete;
165 
166 };
167 
168 #endif
169 
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkGraphGeodesicPath::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGraphGeodesicPath
Abstract base for classes that generate a geodesic path on a graph (mesh).
Definition: vtkGraphGeodesicPath.h:32
vtkDijkstraGraphGeodesicPath::AdjacencyBuildTime
vtkTimeStamp AdjacencyBuildTime
Definition: vtkDijkstraGraphGeodesicPath.h:123
vtkDijkstraGraphGeodesicPath::UseScalarWeights
vtkTypeBool UseScalarWeights
Definition: vtkDijkstraGraphGeodesicPath.h:157
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkDijkstraGraphGeodesicPath::StopWhenEndReached
vtkTypeBool StopWhenEndReached
Definition: vtkDijkstraGraphGeodesicPath.h:156
vtkDijkstraGraphGeodesicPath::CalculateDynamicEdgeCost
virtual double CalculateDynamicEdgeCost(vtkDataSet *, vtkIdType, vtkIdType)
Definition: vtkDijkstraGraphGeodesicPath.h:130
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkDijkstraGraphGeodesicPath::IdList
vtkIdList * IdList
Definition: vtkDijkstraGraphGeodesicPath.h:151
vtkDijkstraGraphGeodesicPath::NumberOfVertices
int NumberOfVertices
Definition: vtkDijkstraGraphGeodesicPath.h:148
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkDijkstraGraphGeodesicPath::RepelPathFromVertices
vtkTypeBool RepelPathFromVertices
Definition: vtkDijkstraGraphGeodesicPath.h:158
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkGraphGeodesicPath.h
vtkDijkstraGraphGeodesicPath::RepelVertices
vtkPoints * RepelVertices
Definition: vtkDijkstraGraphGeodesicPath.h:160
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkDijkstraGraphGeodesicPath
Dijkstra algorithm to compute the graph geodesic.
Definition: vtkDijkstraGraphGeodesicPath.h:47
vtkDijkstraGraphInternals
Helper class due to PIMPL excess.
Definition: vtkDijkstraGraphInternals.h:32
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:41
vtkDijkstraGraphGeodesicPath::Internals
vtkDijkstraGraphInternals * Internals
Definition: vtkDijkstraGraphGeodesicPath.h:154
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()