VTK  9.3.20240329
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 
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:
101 
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
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
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
Dijkstra algorithm to compute the graph geodesic.
Dijkstra algorithm to compute the graph geodesic.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkImageData * GetInputAsImageData()
Specify the image object which is used as a cost function.
static vtkDijkstraImageGeodesicPath * New()
Instantiate the class.
double CalculateStaticEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
double CalculateDynamicEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v) override
~vtkDijkstraImageGeodesicPath() override
void SetImageWeight(double)
Image cost weight.
void SetEdgeLengthWeight(double)
Edge length cost weight.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for printing and determining type information.
void SetInputData(vtkDataObject *)
Specify the image object which is used as a cost function.
void UpdateStaticCosts(vtkImageData *image)
void BuildAdjacency(vtkDataSet *inData) override
topologically and geometrically regular array of data
Definition: vtkImageData.h:156
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ image
Definition: vtkX3D.h:374
int vtkIdType
Definition: vtkType.h:315