VTK
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 
53 #include "vtkFiltersModelingModule.h" // For export macro
55 
56 class vtkImageData;
57 
58 class VTKFILTERSMODELING_EXPORT vtkDijkstraImageGeodesicPath :
60 {
61 public:
62 
67 
69 
73  void PrintSelf( ostream& os, vtkIndent indent ) VTK_OVERRIDE;
75 
77 
80  void SetInputData( vtkDataObject* );
81  vtkImageData* GetInputAsImageData();
83 
85 
88  void SetImageWeight( double );
89  vtkGetMacro( ImageWeight, double );
91 
93 
96  void SetEdgeLengthWeight( double );
97  vtkGetMacro( EdgeLengthWeight, double );
99 
101 
104  vtkSetClampMacro( CurvatureWeight, double, 0.0, 1.0 );
105  vtkGetMacro( CurvatureWeight, double );
107 
108 protected:
110  ~vtkDijkstraImageGeodesicPath() VTK_OVERRIDE;
111 
112  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
113  int RequestData(vtkInformation *, vtkInformationVector **,
114  vtkInformationVector *) VTK_OVERRIDE;
115 
116  // Build a graph description of the image
117  void BuildAdjacency( vtkDataSet *inData ) VTK_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) VTK_OVERRIDE;
124  double CalculateDynamicEdgeCost( vtkDataSet *inData , vtkIdType u, vtkIdType v) VTK_OVERRIDE;
125 
126  double PixelSize;
127  double ImageWeight;
128  double EdgeLengthWeight;
129  double CurvatureWeight;
130  bool RebuildStaticCosts;
131 
132 private:
134  void operator=(const vtkDijkstraImageGeodesicPath&) VTK_DELETE_FUNCTION;
135 
136 };
137 
138 #endif
139 
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methids for printing and determining type information.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
int vtkIdType
Definition: vtkType.h:345
Dijkstra algorithm to compute the graph geodesic.
static vtkDijkstraGraphGeodesicPath * New()
Instantiate the class.
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
void SetInputData(vtkDataObject *)
Assign a data object as input.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:58
Dijkstra algorithm to compute the graph geodesic.