VTK  9.3.0
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
23#ifndef vtkCellQuality_h
24#define vtkCellQuality_h
25
26#include "vtkDataSetAlgorithm.h"
27#include "vtkFiltersVerdictModule.h" // For export macro
28#include "vtkMeshQuality.h" // For QualityMeasureType
29
30VTK_ABI_NAMESPACE_BEGIN
31class vtkCell;
32class vtkCellQualityFunctor;
33class vtkDataArray;
34class vtkIdList;
35class vtkPoints;
36
37class VTKFILTERSVERDICT_EXPORT vtkCellQuality : public vtkDataSetAlgorithm
38{
39private:
40 friend class vtkCellQualityFunctor;
41
42public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
61 virtual void SetQualityMeasure(int measure)
62 {
63 this->SetQualityMeasure(static_cast<QualityMeasureTypes>(measure));
64 }
66 void SetQualityMeasureToArea() { this->SetQualityMeasure(QualityMeasureTypes::AREA); }
68 {
69 this->SetQualityMeasure(QualityMeasureTypes::ASPECT_FROBENIUS);
70 }
72 {
73 this->SetQualityMeasure(QualityMeasureTypes::ASPECT_GAMMA);
74 }
76 {
77 this->SetQualityMeasure(QualityMeasureTypes::ASPECT_RATIO);
78 }
80 {
81 this->SetQualityMeasure(QualityMeasureTypes::COLLAPSE_RATIO);
82 }
83 void SetQualityMeasureToCondition() { this->SetQualityMeasure(QualityMeasureTypes::CONDITION); }
84 void SetQualityMeasureToDiagonal() { this->SetQualityMeasure(QualityMeasureTypes::DIAGONAL); }
85 void SetQualityMeasureToDimension() { this->SetQualityMeasure(QualityMeasureTypes::DIMENSION); }
86 void SetQualityMeasureToDistortion() { this->SetQualityMeasure(QualityMeasureTypes::DISTORTION); }
87 void SetQualityMeasureToJacobian() { this->SetQualityMeasure(QualityMeasureTypes::JACOBIAN); }
88 void SetQualityMeasureToMaxAngle() { this->SetQualityMeasure(QualityMeasureTypes::MAX_ANGLE); }
90 {
91 this->SetQualityMeasure(QualityMeasureTypes::MAX_ASPECT_FROBENIUS);
92 }
94 {
95 this->SetQualityMeasure(QualityMeasureTypes::MAX_EDGE_RATIO);
96 }
98 {
99 this->SetQualityMeasure(QualityMeasureTypes::MED_ASPECT_FROBENIUS);
100 }
101 void SetQualityMeasureToMinAngle() { this->SetQualityMeasure(QualityMeasureTypes::MIN_ANGLE); }
102 void SetQualityMeasureToOddy() { this->SetQualityMeasure(QualityMeasureTypes::ODDY); }
104 {
105 this->SetQualityMeasure(QualityMeasureTypes::RADIUS_RATIO);
106 }
108 {
109 this->SetQualityMeasure(QualityMeasureTypes::RELATIVE_SIZE_SQUARED);
110 }
112 {
113 this->SetQualityMeasure(QualityMeasureTypes::SCALED_JACOBIAN);
114 }
116 {
117 this->SetQualityMeasure(QualityMeasureTypes::SHAPE_AND_SIZE);
118 }
119 void SetQualityMeasureToShape() { this->SetQualityMeasure(QualityMeasureTypes::SHAPE); }
121 {
122 this->SetQualityMeasure(QualityMeasureTypes::SHEAR_AND_SIZE);
123 }
124 void SetQualityMeasureToShear() { this->SetQualityMeasure(QualityMeasureTypes::SHEAR); }
125 void SetQualityMeasureToSkew() { this->SetQualityMeasure(QualityMeasureTypes::SKEW); }
126 void SetQualityMeasureToStretch() { this->SetQualityMeasure(QualityMeasureTypes::STRETCH); }
127 void SetQualityMeasureToTaper() { this->SetQualityMeasure(QualityMeasureTypes::TAPER); }
128 void SetQualityMeasureToVolume() { this->SetQualityMeasure(QualityMeasureTypes::VOLUME); }
129 void SetQualityMeasureToWarpage() { this->SetQualityMeasure(QualityMeasureTypes::WARPAGE); }
131
133
139 vtkSetMacro(UnsupportedGeometry, double);
140 vtkGetMacro(UnsupportedGeometry, double);
142
144
151 vtkSetMacro(UndefinedQuality, double);
152 vtkGetMacro(UndefinedQuality, double);
154
158
159protected:
160 ~vtkCellQuality() override;
162
182
213
238
249
266
294
302
309
311
313
314 // Default return value for unsupported geometry
316
317 // Default return value for qualities that are not well-defined for certain
318 // types of supported geometries. e.g. volume of a triangle
320
321private:
322 vtkIdList* PointIds;
323 vtkPoints* Points;
324
325 vtkCellQuality(const vtkCellQuality&) = delete;
326 void operator=(const vtkCellQuality&) = delete;
327};
328
329VTK_ABI_NAMESPACE_END
330#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:50
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:23
a simple class to control print indentation
Definition vtkIndent.h:29
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:29