VTK  9.3.1
vtkDijkstraImageGeodesicPath.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
41 #ifndef vtkDijkstraImageGeodesicPath_h
42 #define vtkDijkstraImageGeodesicPath_h
43 
45 #include "vtkFiltersModelingModule.h" // For export macro
46 
47 VTK_ABI_NAMESPACE_BEGIN
48 class vtkImageData;
49 
50 class VTKFILTERSMODELING_EXPORT vtkDijkstraImageGeodesicPath : public vtkDijkstraGraphGeodesicPath
51 {
52 public:
57 
59 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
67 
71  vtkImageData* GetInputAsImageData();
73 
75 
78  void SetImageWeight(double);
79  vtkGetMacro(ImageWeight, double);
81 
83 
86  void SetEdgeLengthWeight(double);
87  vtkGetMacro(EdgeLengthWeight, double);
89 
91 
94  vtkSetClampMacro(CurvatureWeight, double, 0.0, 1.0);
95  vtkGetMacro(CurvatureWeight, double);
97 
98 protected:
100  ~vtkDijkstraImageGeodesicPath() override;
101 
102  int FillInputPortInformation(int port, vtkInformation* info) override;
104 
105  // Build a graph description of the image
106  void BuildAdjacency(vtkDataSet* inData) override;
107 
108  // Update static costs without rebuilding adjacencyh when static weights change
109  void UpdateStaticCosts(vtkImageData* image);
110 
111  // Override parent class methods.
112  double CalculateStaticEdgeCost(vtkDataSet* inData, vtkIdType u, vtkIdType v) override;
113  double CalculateDynamicEdgeCost(vtkDataSet* inData, vtkIdType u, vtkIdType v) override;
114 
115  double PixelSize;
116  double ImageWeight;
120 
121 private:
123  void operator=(const vtkDijkstraImageGeodesicPath&) = delete;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for printing and determining type information.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
virtual void BuildAdjacency(vtkDataSet *inData)
int vtkIdType
Definition: vtkType.h:315
Dijkstra algorithm to compute the graph geodesic.
virtual double CalculateStaticEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v)
static vtkDijkstraGraphGeodesicPath * New()
Instantiate the class.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void SetInputData(vtkDataObject *)
Assign a data object as input.
virtual double CalculateDynamicEdgeCost(vtkDataSet *, vtkIdType, vtkIdType)
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:54
Dijkstra algorithm to compute the graph geodesic.