VTK  9.0.1
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 =========================================================================*/
50 #ifndef vtkDijkstraImageGeodesicPath_h
51 #define vtkDijkstraImageGeodesicPath_h
52 
54 #include "vtkFiltersModelingModule.h" // For export macro
55 
56 class vtkImageData;
57 
58 class VTKFILTERSMODELING_EXPORT vtkDijkstraImageGeodesicPath : public vtkDijkstraGraphGeodesicPath
59 {
60 public:
65 
67 
71  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
75 
79  vtkImageData* GetInputAsImageData();
81 
83 
86  void SetImageWeight(double);
87  vtkGetMacro(ImageWeight, double);
89 
91 
94  void SetEdgeLengthWeight(double);
95  vtkGetMacro(EdgeLengthWeight, double);
97 
99 
102  vtkSetClampMacro(CurvatureWeight, double, 0.0, 1.0);
103  vtkGetMacro(CurvatureWeight, double);
105 
106 protected:
108  ~vtkDijkstraImageGeodesicPath() override;
109 
110  int FillInputPortInformation(int port, vtkInformation* info) override;
112 
113  // Build a graph description of the image
114  void BuildAdjacency(vtkDataSet* inData) override;
115 
116  // Update static costs without rebuilding adjacencyh when static weights change
117  void UpdateStaticCosts(vtkImageData* image);
118 
119  // Override parent class methods.
120  double CalculateStaticEdgeCost(vtkDataSet* inData, vtkIdType u, vtkIdType v) override;
121  double CalculateDynamicEdgeCost(vtkDataSet* inData, vtkIdType u, vtkIdType v) override;
122 
123  double PixelSize;
124  double ImageWeight;
128 
129 private:
131  void operator=(const vtkDijkstraImageGeodesicPath&) = delete;
132 };
133 
134 #endif
vtkDijkstraGraphGeodesicPath::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkX3D::image
@ image
Definition: vtkX3D.h:380
vtkDijkstraImageGeodesicPath::RebuildStaticCosts
bool RebuildStaticCosts
Definition: vtkDijkstraImageGeodesicPath.h:127
vtkDijkstraGraphGeodesicPath::CalculateDynamicEdgeCost
virtual double CalculateDynamicEdgeCost(vtkDataSet *, vtkIdType, vtkIdType)
Definition: vtkDijkstraGraphGeodesicPath.h:128
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkDijkstraImageGeodesicPath
Dijkstra algorithm to compute the graph geodesic.
Definition: vtkDijkstraImageGeodesicPath.h:58
vtkDijkstraGraphGeodesicPath::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPolyDataAlgorithm::SetInputData
void SetInputData(vtkDataObject *)
Assign a data object as input.
vtkDijkstraImageGeodesicPath::CurvatureWeight
double CurvatureWeight
Definition: vtkDijkstraImageGeodesicPath.h:126
vtkDijkstraGraphGeodesicPath.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkDijkstraImageGeodesicPath::EdgeLengthWeight
double EdgeLengthWeight
Definition: vtkDijkstraImageGeodesicPath.h:125
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkDijkstraGraphGeodesicPath::CalculateStaticEdgeCost
virtual double CalculateStaticEdgeCost(vtkDataSet *inData, vtkIdType u, vtkIdType v)
vtkDijkstraImageGeodesicPath::ImageWeight
double ImageWeight
Definition: vtkDijkstraImageGeodesicPath.h:124
vtkDijkstraGraphGeodesicPath::BuildAdjacency
virtual void BuildAdjacency(vtkDataSet *inData)
vtkDijkstraGraphGeodesicPath
Dijkstra algorithm to compute the graph geodesic.
Definition: vtkDijkstraGraphGeodesicPath.h:48
vtkDijkstraImageGeodesicPath::PixelSize
double PixelSize
Definition: vtkDijkstraImageGeodesicPath.h:123
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkDijkstraGraphGeodesicPath::New
static vtkDijkstraGraphGeodesicPath * New()
Instantiate the class.
vtkGeodesicPath::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.