VTK  9.4.20250106
vtkCellQuality.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
26#ifndef vtkCellQuality_h
27#define vtkCellQuality_h
28
29#include "vtkDataSetAlgorithm.h"
30#include "vtkFiltersVerdictModule.h" // For export macro
31#include "vtkMeshQuality.h" // For QualityMeasureType
32
33VTK_ABI_NAMESPACE_BEGIN
34class vtkCell;
35class vtkCellQualityFunctor;
36class vtkDataArray;
37class vtkIdList;
38class vtkPoints;
39
40class VTKFILTERSVERDICT_EXPORT vtkCellQuality : public vtkDataSetAlgorithm
41{
42private:
43 friend class vtkCellQualityFunctor;
44
45public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
64 virtual void SetQualityMeasure(int measure)
65 {
66 this->SetQualityMeasure(static_cast<QualityMeasureTypes>(measure));
67 }
69 void SetQualityMeasureToArea() { this->SetQualityMeasure(QualityMeasureTypes::AREA); }
71 {
72 this->SetQualityMeasure(QualityMeasureTypes::ASPECT_FROBENIUS);
73 }
75 {
76 this->SetQualityMeasure(QualityMeasureTypes::ASPECT_GAMMA);
77 }
79 {
80 this->SetQualityMeasure(QualityMeasureTypes::ASPECT_RATIO);
81 }
83 {
84 this->SetQualityMeasure(QualityMeasureTypes::COLLAPSE_RATIO);
85 }
86 void SetQualityMeasureToCondition() { this->SetQualityMeasure(QualityMeasureTypes::CONDITION); }
87 void SetQualityMeasureToDiagonal() { this->SetQualityMeasure(QualityMeasureTypes::DIAGONAL); }
88 void SetQualityMeasureToDimension() { this->SetQualityMeasure(QualityMeasureTypes::DIMENSION); }
89 void SetQualityMeasureToDistortion() { this->SetQualityMeasure(QualityMeasureTypes::DISTORTION); }
90 void SetQualityMeasureToJacobian() { this->SetQualityMeasure(QualityMeasureTypes::JACOBIAN); }
91 void SetQualityMeasureToMaxAngle() { this->SetQualityMeasure(QualityMeasureTypes::MAX_ANGLE); }
93 {
94 this->SetQualityMeasure(QualityMeasureTypes::MAX_ASPECT_FROBENIUS);
95 }
97 {
98 this->SetQualityMeasure(QualityMeasureTypes::MAX_EDGE_RATIO);
99 }
101 {
102 this->SetQualityMeasure(QualityMeasureTypes::MED_ASPECT_FROBENIUS);
103 }
104 void SetQualityMeasureToMinAngle() { this->SetQualityMeasure(QualityMeasureTypes::MIN_ANGLE); }
105 void SetQualityMeasureToOddy() { this->SetQualityMeasure(QualityMeasureTypes::ODDY); }
107 {
108 this->SetQualityMeasure(QualityMeasureTypes::RADIUS_RATIO);
109 }
111 {
112 this->SetQualityMeasure(QualityMeasureTypes::RELATIVE_SIZE_SQUARED);
113 }
115 {
116 this->SetQualityMeasure(QualityMeasureTypes::SCALED_JACOBIAN);
117 }
119 {
120 this->SetQualityMeasure(QualityMeasureTypes::SHAPE_AND_SIZE);
121 }
122 void SetQualityMeasureToShape() { this->SetQualityMeasure(QualityMeasureTypes::SHAPE); }
124 {
125 this->SetQualityMeasure(QualityMeasureTypes::SHEAR_AND_SIZE);
126 }
127 void SetQualityMeasureToShear() { this->SetQualityMeasure(QualityMeasureTypes::SHEAR); }
128 void SetQualityMeasureToSkew() { this->SetQualityMeasure(QualityMeasureTypes::SKEW); }
129 void SetQualityMeasureToStretch() { this->SetQualityMeasure(QualityMeasureTypes::STRETCH); }
130 void SetQualityMeasureToTaper() { this->SetQualityMeasure(QualityMeasureTypes::TAPER); }
131 void SetQualityMeasureToVolume() { this->SetQualityMeasure(QualityMeasureTypes::VOLUME); }
132 void SetQualityMeasureToWarpage() { this->SetQualityMeasure(QualityMeasureTypes::WARPAGE); }
134
136
142 vtkSetMacro(UnsupportedGeometry, double);
143 vtkGetMacro(UnsupportedGeometry, double);
145
147
154 vtkSetMacro(UndefinedQuality, double);
155 vtkGetMacro(UndefinedQuality, double);
157
161
162protected:
163 ~vtkCellQuality() override;
165
185
216
241
252
269
297
305
312
314
316
317 // Default return value for unsupported geometry
319
320 // Default return value for qualities that are not well-defined for certain
321 // types of supported geometries. e.g. volume of a triangle
323
324private:
325 vtkIdList* PointIds;
326 vtkPoints* Points;
327
328 vtkCellQuality(const vtkCellQuality&) = delete;
329 void operator=(const vtkCellQuality&) = delete;
330};
331
332VTK_ABI_NAMESPACE_END
333#endif // vtkCellQuality_h
Calculate functions of quality of the elements of a mesh.
double UnsupportedGeometry
vtkMeshQuality::QualityMeasureTypes QualityMeasure
double ComputeQuadQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of quadrilaterals.
double PixelArea(vtkCell *)
void SetQualityMeasureToCondition()
Set/Get the particular estimator used to function the quality of all supported geometries.
double ComputeWedgeQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of wedges.
void SetQualityMeasureToShearAndSize()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToScaledJacobian()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToAspectRatio()
Set/Get the particular estimator used to function the quality of all supported geometries.
double ComputePyramidQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of pyramids.
void SetQualityMeasureToRelativeSizeSquared()
Set/Get the particular estimator used to function the quality of all supported geometries.
double PolygonArea(vtkCell *)
void SetQualityMeasureToAspectFrobenius()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToDistortion()
Set/Get the particular estimator used to function the quality of all supported geometries.
~vtkCellQuality() override
vtkGetEnumMacro(QualityMeasure, QualityMeasureTypes)
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToShape()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToOddy()
Set/Get the particular estimator used to function the quality of all supported geometries.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetQualityMeasureToRadiusRatio()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToMaxAngle()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToDimension()
Set/Get the particular estimator used to function the quality of all supported geometries.
double ComputeTriangleStripQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of triangle strip.
void SetQualityMeasureToMaxEdgeRatio()
Set/Get the particular estimator used to function the quality of all supported geometries.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void SetQualityMeasureToCollapseRatio()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToTaper()
Set/Get the particular estimator used to function the quality of all supported geometries.
virtual void SetQualityMeasure(int measure)
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToShapeAndSize()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToWarpage()
Set/Get the particular estimator used to function the quality of all supported geometries.
double ComputeTriangleQuality(vtkCell *)
Set/Get the particular estimator used to function the quality of triangles.
double TriangleStripArea(vtkCell *)
void SetQualityMeasureToVolume()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToDiagonal()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToAspectGamma()
Set/Get the particular estimator used to function the quality of all supported geometries.
static vtkCellQuality * New()
void SetQualityMeasureToArea()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToJacobian()
Set/Get the particular estimator used to function the quality of all supported geometries.
vtkSetEnumMacro(QualityMeasure, QualityMeasureTypes)
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToSkew()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToMaxAspectFrobenius()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToStretch()
Set/Get the particular estimator used to function the quality of all supported geometries.
double ComputeTetQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of tetrahedra.
void SetQualityMeasureToMinAngle()
Set/Get the particular estimator used to function the quality of all supported geometries.
void SetQualityMeasureToMedAspectFrobenius()
Set/Get the particular estimator used to function the quality of all supported geometries.
double ComputePixelQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of pixel.
double ComputeHexQuality(vtkCell *)
Set/Get the particular estimator used to measure the quality of hexahedra.
void SetQualityMeasureToShear()
Set/Get the particular estimator used to function the quality of all supported geometries.
abstract class to specify cell behavior
Definition vtkCell.h:130
abstract superclass for arrays of numeric data
Superclass for algorithms that produce output of the same type as input.
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
QualityMeasureTypes
Enum which lists the Quality Measures Types.
represent and manipulate 3D points
Definition vtkPoints.h:139