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 "vtkGraphGeodesicPath.h"
41 
43 class vtkIdList;
44 
47 {
48 public:
49 
52 
54 
56  void PrintSelf(ostream& os, vtkIndent indent);
58 
60 
61  vtkGetObjectMacro(IdList, vtkIdList);
63 
65 
67  vtkSetMacro(StopWhenEndReached, int);
68  vtkGetMacro(StopWhenEndReached, int);
69  vtkBooleanMacro(StopWhenEndReached, int);
71 
73 
74  vtkSetMacro(UseScalarWeights, int);
75  vtkGetMacro(UseScalarWeights, int);
76  vtkBooleanMacro(UseScalarWeights, int);
78 
80 
81  vtkSetMacro(RepelPathFromVertices, int);
82  vtkGetMacro(RepelPathFromVertices, int);
83  vtkBooleanMacro(RepelPathFromVertices, int);
85 
87 
88  virtual void SetRepelVertices(vtkPoints*);
89  vtkGetObjectMacro(RepelVertices, vtkPoints);
91 
93  virtual double GetGeodesicLength() { return 0.0; }
94 
96  virtual void GetCumulativeWeights(vtkDoubleArray *weights);
97 
98 protected:
101 
104 
105  // Build a graph description of the input.
106  virtual void BuildAdjacency( vtkDataSet *inData );
107 
109 
110  // The fixed cost going from vertex u to v.
111  virtual double CalculateStaticEdgeCost( vtkDataSet *inData, vtkIdType u, vtkIdType v);
112 
113  // The cost going from vertex u to v that may depend on one or more vertices
114  //that precede u.
116  { return 0.0; }
117 
118  void Initialize( vtkDataSet *inData );
119 
120  void Reset();
121 
122  // Calculate shortest path from vertex startv to vertex endv.
123  virtual void ShortestPath( vtkDataSet *inData, int startv, int endv );
124 
125  // Relax edge u,v with weight w.
126  void Relax(const int& u, const int& v, const double& w);
127 
128  // Backtrace the shortest path
129  void TraceShortestPath( vtkDataSet* inData, vtkPolyData* outPoly,
130  vtkIdType startv, vtkIdType endv);
131 
132  // The number of vertices.
134 
135  // The vertex ids on the shortest path.
137 
138  //Internalized STL containers.
140 
144 
146 
147 private:
149  void operator=(const vtkDijkstraGraphGeodesicPath&); // Not implemented.
150 
151 };
152 
153 #endif
154 
#define VTK_GRAPHICS_EXPORT
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
record modification and/or execution time
Definition: vtkTimeStamp.h:33
int vtkIdType
Definition: vtkType.h:255
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
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:37
vtkDijkstraGraphInternals * Internals
Helper class due to PIMPL excess.
list of point or cell ids
Definition: vtkIdList.h:34
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