VTK  9.2.6
vtkDijkstraImageGeodesicPath.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDijkstraImageGeodesicPath.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 =========================================================================*/
53 #ifndef vtkDijkstraImageGeodesicPath_h
54 #define vtkDijkstraImageGeodesicPath_h
55 
57 #include "vtkFiltersModelingModule.h" // For export macro
58 
59 class vtkImageData;
60 
61 class VTKFILTERSMODELING_EXPORT vtkDijkstraImageGeodesicPath : public vtkDijkstraGraphGeodesicPath
62 {
63 public:
68 
70 
74  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
78 
82  vtkImageData* GetInputAsImageData();
84 
86 
89  void SetImageWeight(double);
90  vtkGetMacro(ImageWeight, double);
92 
94 
97  void SetEdgeLengthWeight(double);
98  vtkGetMacro(EdgeLengthWeight, double);
100 
102 
105  vtkSetClampMacro(CurvatureWeight, double, 0.0, 1.0);
106  vtkGetMacro(CurvatureWeight, double);
108 
109 protected:
111  ~vtkDijkstraImageGeodesicPath() override;
112 
113  int FillInputPortInformation(int port, vtkInformation* info) override;
115 
116  // Build a graph description of the image
117  void BuildAdjacency(vtkDataSet* inData) override;
118 
119  // Update static costs without rebuilding adjacencyh when static weights change
120  void UpdateStaticCosts(vtkImageData* image);
121 
122  // Override parent class methods.
123  double CalculateStaticEdgeCost(vtkDataSet* inData, vtkIdType u, vtkIdType v) override;
124  double CalculateDynamicEdgeCost(vtkDataSet* inData, vtkIdType u, vtkIdType v) override;
125 
126  double PixelSize;
127  double ImageWeight;
131 
132 private:
134  void operator=(const vtkDijkstraImageGeodesicPath&) = delete;
135 };
136 
137 #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:62
virtual void BuildAdjacency(vtkDataSet *inData)
int vtkIdType
Definition: vtkType.h:332
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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
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:65
Dijkstra algorithm to compute the graph geodesic.