VTK: Filters/General/vtkCurvatures.h Source File

| VTK 9.3.1

vtkCurvatures.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
68 #ifndef vtkCurvatures_h
69 #define vtkCurvatures_h
70
71 #include "vtkFiltersGeneralModule.h" // For export macro
72 #include "vtkPolyDataAlgorithm.h"
73
74 #define VTK_CURVATURE_GAUSS 0
75 #define VTK_CURVATURE_MEAN 1
76 #define VTK_CURVATURE_MAXIMUM 2
77 #define VTK_CURVATURE_MINIMUM 3
78
79 VTK_ABI_NAMESPACE_BEGIN
80 class VTKFILTERSGENERAL_EXPORT vtkCurvatures : public vtkPolyDataAlgorithm
81 {
82 public:
83 vtkTypeMacro(vtkCurvatures, vtkPolyDataAlgorithm);
84 void PrintSelf(ostream& os, vtkIndent indent) override;
85
89 static vtkCurvatures* New();
90
92
99 vtkSetMacro(CurvatureType, int);
100 vtkGetMacro(CurvatureType, int);
101 void SetCurvatureTypeToGaussian() { this->SetCurvatureType(VTK_CURVATURE_GAUSS); }
102 void SetCurvatureTypeToMean() { this->SetCurvatureType(VTK_CURVATURE_MEAN); }
103 void SetCurvatureTypeToMaximum() { this->SetCurvatureType(VTK_CURVATURE_MAXIMUM); }
104 void SetCurvatureTypeToMinimum() { this->SetCurvatureType(VTK_CURVATURE_MINIMUM); }
106
108
112 vtkSetMacro(InvertMeanCurvature, vtkTypeBool);
113 vtkGetMacro(InvertMeanCurvature, vtkTypeBool);
114 vtkBooleanMacro(InvertMeanCurvature, vtkTypeBool);
116
117 protected:
118 vtkCurvatures();
119
120 // Usual data generation method
121 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
122
126 void GetGaussCurvature(vtkPolyData* output);
127
128 void ComputeGaussCurvature(vtkCellArray* facets, vtkPolyData* output, double* gaussCurvatureData);
129
133 void GetMeanCurvature(vtkPolyData* output);
134
138 void GetMaximumCurvature(vtkPolyData* input, vtkPolyData* output);
139
143 void GetMinimumCurvature(vtkPolyData* input, vtkPolyData* output);
144
145 // Vars
146 int CurvatureType;
147 vtkTypeBool InvertMeanCurvature;
148
149 private:
150 vtkCurvatures(const vtkCurvatures&) = delete;
151 void operator=(const vtkCurvatures&) = delete;
152 };
153
154 VTK_ABI_NAMESPACE_END
155 #endif
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkCurvatures
compute curvatures (Gauss and mean) of a Polydata object
Definition: vtkCurvatures.h:81
vtkCurvatures::vtkCurvatures
vtkCurvatures()
vtkCurvatures::SetCurvatureTypeToGaussian
void SetCurvatureTypeToGaussian()
Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature"...
Definition: vtkCurvatures.h:101
vtkCurvatures::SetCurvatureTypeToMaximum
void SetCurvatureTypeToMaximum()
Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature"...
Definition: vtkCurvatures.h:103
vtkCurvatures::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCurvatures::New
static vtkCurvatures * New()
Construct with curvature type set to Gauss.
vtkCurvatures::GetMeanCurvature
void GetMeanCurvature(vtkPolyData *output)
Discrete Mean curvature (H) computation.
vtkCurvatures::SetCurvatureTypeToMinimum
void SetCurvatureTypeToMinimum()
Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature"...
Definition: vtkCurvatures.h:104
vtkCurvatures::SetCurvatureTypeToMean
void SetCurvatureTypeToMean()
Set/Get Curvature type VTK_CURVATURE_GAUSS: Gaussian curvature, stored as DataArray "Gauss_Curvature"...
Definition: vtkCurvatures.h:102
vtkCurvatures::CurvatureType
int CurvatureType
Definition: vtkCurvatures.h:146
vtkCurvatures::GetGaussCurvature
void GetGaussCurvature(vtkPolyData *output)
Discrete Gauss curvature (K) computation.
vtkCurvatures::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkCurvatures::GetMaximumCurvature
void GetMaximumCurvature(vtkPolyData *input, vtkPolyData *output)
Maximum principal curvature.
vtkCurvatures::ComputeGaussCurvature
void ComputeGaussCurvature(vtkCellArray *facets, vtkPolyData *output, double *gaussCurvatureData)
vtkCurvatures::GetMinimumCurvature
void GetMinimumCurvature(vtkPolyData *input, vtkPolyData *output)
Minimum principal curvature.
vtkCurvatures::InvertMeanCurvature
vtkTypeBool InvertMeanCurvature
Definition: vtkCurvatures.h:147
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
VTK_CURVATURE_MAXIMUM
#define VTK_CURVATURE_MAXIMUM
Definition: vtkCurvatures.h:76
VTK_CURVATURE_MINIMUM
#define VTK_CURVATURE_MINIMUM
Definition: vtkCurvatures.h:77
VTK_CURVATURE_MEAN
#define VTK_CURVATURE_MEAN
Definition: vtkCurvatures.h:75
VTK_CURVATURE_GAUSS
#define VTK_CURVATURE_GAUSS
Definition: vtkCurvatures.h:74
vtkPolyDataAlgorithm.h