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 
62  vtkGetObjectMacro(IdList, vtkIdList);
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 
94  virtual void GetCumulativeWeights(vtkDoubleArray *weights);
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.
109  virtual double CalculateStaticEdgeCost( vtkDataSet *inData, vtkIdType u, vtkIdType 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 
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
record modification and/or execution time
Definition: vtkTimeStamp.h:34
#define VTKFILTERSMODELING_EXPORT
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Dijkstra algorithm to compute the graph geodesic.
dynamic, self-adjusting array of double
void PrintSelf(ostream &os, vtkIndent indent)
static vtkPolyDataAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkDijkstraGraphInternals * Internals
Helper class due to PIMPL excess.
list of point or cell ids
Definition: vtkIdList.h:35
Abstract base for classes that generate a geodesic path on a graph (mesh).
virtual double CalculateDynamicEdgeCost(vtkDataSet *, vtkIdType, vtkIdType)
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38