VTK  9.0.20210223
vtkCurvatures.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCurvatures.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 =========================================================================*/
64 #ifndef vtkCurvatures_h
65 #define vtkCurvatures_h
66 
67 #include "vtkFiltersGeneralModule.h" // For export macro
68 #include "vtkPolyDataAlgorithm.h"
69 
70 #define VTK_CURVATURE_GAUSS 0
71 #define VTK_CURVATURE_MEAN 1
72 #define VTK_CURVATURE_MAXIMUM 2
73 #define VTK_CURVATURE_MINIMUM 3
74 
75 class VTKFILTERSGENERAL_EXPORT vtkCurvatures : public vtkPolyDataAlgorithm
76 {
77 public:
79  void PrintSelf(ostream& os, vtkIndent indent) override;
80 
84  static vtkCurvatures* New();
85 
87 
94  vtkSetMacro(CurvatureType, int);
95  vtkGetMacro(CurvatureType, int);
96  void SetCurvatureTypeToGaussian() { this->SetCurvatureType(VTK_CURVATURE_GAUSS); }
97  void SetCurvatureTypeToMean() { this->SetCurvatureType(VTK_CURVATURE_MEAN); }
98  void SetCurvatureTypeToMaximum() { this->SetCurvatureType(VTK_CURVATURE_MAXIMUM); }
99  void SetCurvatureTypeToMinimum() { this->SetCurvatureType(VTK_CURVATURE_MINIMUM); }
101 
103 
107  vtkSetMacro(InvertMeanCurvature, vtkTypeBool);
108  vtkGetMacro(InvertMeanCurvature, vtkTypeBool);
109  vtkBooleanMacro(InvertMeanCurvature, vtkTypeBool);
111 
112 protected:
113  vtkCurvatures();
114 
115  // Usual data generation method
117 
122  void GetGaussCurvature(vtkPolyData* output);
123 
124  void ComputeGaussCurvature(vtkCellArray* facets, vtkPolyData* output, double* gaussCurvatureData);
125 
126  // discrete Mean curvature (H) computation,
127  // cf http://www-ipg.umds.ac.uk/p.batchelor/curvatures/curvatures.html
128  void GetMeanCurvature(vtkPolyData* output);
129 
133  void GetMaximumCurvature(vtkPolyData* input, vtkPolyData* output);
134 
138  void GetMinimumCurvature(vtkPolyData* input, vtkPolyData* output);
139 
140  // Vars
143 
144 private:
145  vtkCurvatures(const vtkCurvatures&) = delete;
146  void operator=(const vtkCurvatures&) = delete;
147 };
148 
149 #endif
VTK_CURVATURE_MEAN
#define VTK_CURVATURE_MEAN
Definition: vtkCurvatures.h:71
vtkCurvatures::SetCurvatureTypeToMean
void SetCurvatureTypeToMean()
Definition: vtkCurvatures.h:97
vtkCurvatures::InvertMeanCurvature
vtkTypeBool InvertMeanCurvature
Definition: vtkCurvatures.h:142
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkCurvatures::SetCurvatureTypeToGaussian
void SetCurvatureTypeToGaussian()
Definition: vtkCurvatures.h:96
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_CURVATURE_MAXIMUM
#define VTK_CURVATURE_MAXIMUM
Definition: vtkCurvatures.h:72
vtkPolyDataAlgorithm.h
vtkCurvatures::SetCurvatureTypeToMaximum
void SetCurvatureTypeToMaximum()
Definition: vtkCurvatures.h:98
vtkCurvatures::CurvatureType
int CurvatureType
Definition: vtkCurvatures.h:141
vtkCurvatures::SetCurvatureTypeToMinimum
void SetCurvatureTypeToMinimum()
Definition: vtkCurvatures.h:99
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
VTK_CURVATURE_MINIMUM
#define VTK_CURVATURE_MINIMUM
Definition: vtkCurvatures.h:73
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:180
vtkCurvatures
compute curvatures (Gauss and mean) of a Polydata object
Definition: vtkCurvatures.h:75
VTK_CURVATURE_GAUSS
#define VTK_CURVATURE_GAUSS
Definition: vtkCurvatures.h:70
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41