• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Graphics/vtkDijkstraGraphGeodesicPath.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDijkstraGraphGeodesicPath.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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   vtkTypeRevisionMacro(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 
00095 protected:
00096   vtkDijkstraGraphGeodesicPath();
00097   ~vtkDijkstraGraphGeodesicPath();
00098 
00099   virtual int RequestData(vtkInformation *, vtkInformationVector **, 
00100                           vtkInformationVector *);
00101 
00102   // Build a graph description of the input.
00103   virtual void BuildAdjacency( vtkDataSet *inData );
00104 
00105   vtkTimeStamp AdjacencyBuildTime;
00106   
00107   // The fixed cost going from vertex u to v.
00108   virtual double CalculateStaticEdgeCost( vtkDataSet *inData, vtkIdType u, vtkIdType v);
00109 
00110   // The cost going from vertex u to v that may depend on one or more vertices
00111   //that precede u.
00112   virtual double CalculateDynamicEdgeCost( vtkDataSet *, vtkIdType , vtkIdType )
00113   { return 0.0; }
00114 
00115   void Initialize( vtkDataSet *inData );
00116 
00117   void Reset();
00118 
00119   // Calculate shortest path from vertex startv to vertex endv.
00120   virtual void ShortestPath( vtkDataSet *inData, int startv, int endv );
00121   
00122   // Relax edge u,v with weight w.
00123   void Relax(const int& u, const int& v, const double& w);
00124 
00125   // Backtrace the shortest path
00126   void TraceShortestPath( vtkDataSet* inData, vtkPolyData* outPoly,
00127                vtkIdType startv, vtkIdType endv);
00128   
00129   // The number of vertices.
00130   int NumberOfVertices;
00131   
00132   // The vertex ids on the shortest path.
00133   vtkIdList *IdList;
00134   
00135   //Internalized STL containers.
00136   vtkDijkstraGraphInternals *Internals;
00137   
00138   int StopWhenEndReached;
00139   int UseScalarWeights;
00140   int RepelPathFromVertices;
00141 
00142   vtkPoints* RepelVertices;
00143 
00144 private:
00145   vtkDijkstraGraphGeodesicPath(const vtkDijkstraGraphGeodesicPath&);  // Not implemented.
00146   void operator=(const vtkDijkstraGraphGeodesicPath&);  // Not implemented.
00147 
00148 };
00149 
00150 #endif
00151 

Generated by  doxygen 1.7.1