00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkDijkstraGraphGeodesicPath_h
00038 #define __vtkDijkstraGraphGeodesicPath_h
00039
00040 #include "vtkGraphGeodesicPath.h"
00041
00042 class vtkDijkstraGraphInternals;
00043 class vtkIdList;
00044
00045 class VTK_GRAPHICS_EXPORT vtkDijkstraGraphGeodesicPath :
00046 public vtkGraphGeodesicPath
00047 {
00048 public:
00049
00051 static vtkDijkstraGraphGeodesicPath *New();
00052
00054
00055 vtkTypeMacro(vtkDijkstraGraphGeodesicPath,vtkGraphGeodesicPath);
00056 void PrintSelf(ostream& os, vtkIndent indent);
00058
00060
00061 vtkGetObjectMacro(IdList, vtkIdList);
00063
00065
00067 vtkSetMacro(StopWhenEndReached, int);
00068 vtkGetMacro(StopWhenEndReached, int);
00069 vtkBooleanMacro(StopWhenEndReached, int);
00071
00073
00074 vtkSetMacro(UseScalarWeights, int);
00075 vtkGetMacro(UseScalarWeights, int);
00076 vtkBooleanMacro(UseScalarWeights, int);
00078
00080
00081 vtkSetMacro(RepelPathFromVertices, int);
00082 vtkGetMacro(RepelPathFromVertices, int);
00083 vtkBooleanMacro(RepelPathFromVertices, int);
00085
00087
00088 virtual void SetRepelVertices(vtkPoints*);
00089 vtkGetObjectMacro(RepelVertices, vtkPoints);
00091
00093 virtual double GetGeodesicLength() { return 0.0; }
00094
00096 virtual void GetCumulativeWeights(vtkDoubleArray *weights);
00097
00098 protected:
00099 vtkDijkstraGraphGeodesicPath();
00100 ~vtkDijkstraGraphGeodesicPath();
00101
00102 virtual int RequestData(vtkInformation *, vtkInformationVector **,
00103 vtkInformationVector *);
00104
00105
00106 virtual void BuildAdjacency( vtkDataSet *inData );
00107
00108 vtkTimeStamp AdjacencyBuildTime;
00109
00110
00111 virtual double CalculateStaticEdgeCost( vtkDataSet *inData, vtkIdType u, vtkIdType v);
00112
00113
00114
00115 virtual double CalculateDynamicEdgeCost( vtkDataSet *, vtkIdType , vtkIdType )
00116 { return 0.0; }
00117
00118 void Initialize( vtkDataSet *inData );
00119
00120 void Reset();
00121
00122
00123 virtual void ShortestPath( vtkDataSet *inData, int startv, int endv );
00124
00125
00126 void Relax(const int& u, const int& v, const double& w);
00127
00128
00129 void TraceShortestPath( vtkDataSet* inData, vtkPolyData* outPoly,
00130 vtkIdType startv, vtkIdType endv);
00131
00132
00133 int NumberOfVertices;
00134
00135
00136 vtkIdList *IdList;
00137
00138
00139 vtkDijkstraGraphInternals *Internals;
00140
00141 int StopWhenEndReached;
00142 int UseScalarWeights;
00143 int RepelPathFromVertices;
00144
00145 vtkPoints* RepelVertices;
00146
00147 private:
00148 vtkDijkstraGraphGeodesicPath(const vtkDijkstraGraphGeodesicPath&);
00149 void operator=(const vtkDijkstraGraphGeodesicPath&);
00150
00151 };
00152
00153 #endif
00154