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.
115  virtual double CalculateDynamicEdgeCost( vtkDataSet *, vtkIdType , vtkIdType )
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