VTK
vtkCellQuality.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkObject.cxx
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 =========================================================================*/
31 #ifndef vtkCellQuality_h
32 #define vtkCellQuality_h
33 
34 #include "vtkFiltersVerdictModule.h" // For export macro
35 #include "vtkDataSetAlgorithm.h"
36 
37 class vtkCell;
38 class vtkDataArray;
39 class vtkIdList;
40 class vtkPoints;
41 
43 {
44  //BTX
45  enum
46  {
47  NONE = 0,
48  AREA,
49  ASPECT_BETA,
50  ASPECT_FROBENIUS,
51  ASPECT_GAMMA,
52  ASPECT_RATIO,
53  COLLAPSE_RATIO,
54  CONDITION,
55  DIAGONAL,
56  DIMENSION,
57  DISTORTION,
58  EDGE_RATIO,
59  JACOBIAN,
60  MAX_ANGLE,
61  MAX_ASPECT_FROBENIUS,
62  MAX_EDGE_RATIO,
63  MED_ASPECT_FROBENIUS,
64  MIN_ANGLE,
65  NORMAL,
66  ODDY,
67  RADIUS_RATIO,
68  RELATIVE_SIZE_SQUARED,
69  SCALED_JACOBIAN,
70  SHAPE,
71  SHAPE_AND_SIZE,
72  SHEAR,
73  SHEAR_AND_SIZE,
74  SKEW,
75  STRETCH,
76  TAPER,
77  VOLUME,
78  WARPAGE
79  };
80  //ETX
81 
82 public:
83  void PrintSelf (ostream&, vtkIndent);
85  static vtkCellQuality* New ();
86 
88 
94  vtkSetMacro(QualityMeasure, int);
95  vtkGetMacro(QualityMeasure, int);
97 
99  {
100  this->SetQualityMeasure(AREA);
101  }
103  {
104  this->SetQualityMeasure(ASPECT_BETA);
105  }
107  {
108  this->SetQualityMeasure(ASPECT_FROBENIUS);
109  }
111  {
112  this->SetQualityMeasure(ASPECT_GAMMA);
113  }
115  {
116  this->SetQualityMeasure(ASPECT_RATIO);
117  }
119  {
120  this->SetQualityMeasure(COLLAPSE_RATIO);
121  }
123  {
124  this->SetQualityMeasure(CONDITION);
125  }
127  {
128  this->SetQualityMeasure(DIAGONAL);
129  }
131  {
132  this->SetQualityMeasure(DIMENSION);
133  }
135  {
136  this->SetQualityMeasure(DISTORTION);
137  }
139  {
140  this->SetQualityMeasure(JACOBIAN);
141  }
143  {
144  this->SetQualityMeasure(MAX_ANGLE);
145  }
147  {
148  this->SetQualityMeasure(MAX_ASPECT_FROBENIUS);
149  }
151  {
152  this->SetQualityMeasure(MAX_EDGE_RATIO);
153  }
155  {
156  this->SetQualityMeasure(MED_ASPECT_FROBENIUS);
157  }
159  {
160  this->SetQualityMeasure(MIN_ANGLE);
161  }
163  {
164  this->SetQualityMeasure(ODDY);
165  }
167  {
168  this->SetQualityMeasure(RADIUS_RATIO);
169  }
171  {
172  this->SetQualityMeasure(RELATIVE_SIZE_SQUARED);
173  }
175  {
176  this->SetQualityMeasure(SCALED_JACOBIAN);
177  }
179  {
180  this->SetQualityMeasure(SHAPE_AND_SIZE);
181  }
183  {
184  this->SetQualityMeasure(SHAPE);
185  }
187  {
188  this->SetQualityMeasure(SHEAR_AND_SIZE);
189  }
191  {
192  this->SetQualityMeasure(SHEAR);
193  }
195  {
196  this->SetQualityMeasure(SKEW);
197  }
199  {
200  this->SetQualityMeasure(STRETCH);
201  }
203  {
204  this->SetQualityMeasure(TAPER);
205  }
207  {
208  this->SetQualityMeasure(VOLUME);
209  }
211  {
212  this->SetQualityMeasure(WARPAGE);
213  }
214 
216 
220  vtkSetMacro(UnsupportedGeometry, double);
221  vtkGetMacro(UnsupportedGeometry, double);
223 
225 
230  vtkSetMacro(UndefinedQuality, double);
231  vtkGetMacro(UndefinedQuality, double);
233 
234  double TriangleStripArea (vtkCell*);
235  double PixelArea (vtkCell*);
236  double PolygonArea (vtkCell*);
237 
238 protected:
239  ~vtkCellQuality ();
240  vtkCellQuality ();
241 
247  double ComputeTriangleQuality (vtkCell*);
248 
258  double ComputeQuadQuality (vtkCell*);
259 
266  double ComputeTetQuality (vtkCell*);
267 
274  double ComputeHexQuality (vtkCell*);
275 
279  double ComputeTriangleStripQuality (vtkCell*);
280 
283  double ComputePixelQuality (vtkCell*);
284 
285  virtual int RequestData
287 
289 
293  static int GetCurrentTriangleNormal (double point [3], double normal [3]);
294  static double CurrentTriNormal [3];
296 
298 
299  // Default return value for unsupported geometry
301 
302  // Default return value for qualities that are not well-defined for certain
303  // types of supported geometries. e.g. volume of a triangle
305 
306 private:
307  vtkIdList* PointIds;
308  vtkPoints* Points;
309 
310  vtkCellQuality(const vtkCellQuality&); // Not implemented
311  void operator=(const vtkCellQuality&); // Not implemented
312 };
313 
314 #endif // vtkCellQuality_h
void SetQualityMeasureToMinAngle()
void SetQualityMeasureToVolume()
Store vtkAlgorithm input/output information.
void SetQualityMeasureToShearAndSize()
void SetQualityMeasureToDimension()
void SetQualityMeasureToOddy()
void SetQualityMeasureToJacobian()
void SetQualityMeasureToCollapseRatio()
void SetQualityMeasureToShape()
Calculate functions of quality of the elements of a mesh.
void SetQualityMeasureToShapeAndSize()
#define VTKFILTERSVERDICT_EXPORT
void SetQualityMeasureToShear()
void SetQualityMeasureToTaper()
void SetQualityMeasureToMaxAspectFrobenius()
void SetQualityMeasureToAspectBeta()
double UndefinedQuality
abstract class to specify cell behavior
Definition: vtkCell.h:58
void SetQualityMeasureToAspectFrobenius()
void SetQualityMeasureToDiagonal()
void SetQualityMeasureToScaledJacobian()
void SetQualityMeasureToCondition()
a simple class to control print indentation
Definition: vtkIndent.h:38
void SetQualityMeasureToMedAspectFrobenius()
list of point or cell ids
Definition: vtkIdList.h:35
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void SetQualityMeasureToWarpage()
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void SetQualityMeasureToMaxAngle()
void SetQualityMeasureToRadiusRatio()
void SetQualityMeasureToAspectRatio()
Store zero or more vtkInformation instances.
void SetQualityMeasureToRelativeSizeSquared()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce output of the same type as input.
void SetQualityMeasureToSkew()
void SetQualityMeasureToAspectGamma()
static vtkDataSetAlgorithm * New()
void SetQualityMeasureToStretch()
represent and manipulate 3D points
Definition: vtkPoints.h:38
void SetQualityMeasureToMaxEdgeRatio()
double UnsupportedGeometry
void SetQualityMeasureToArea()
void SetQualityMeasureToDistortion()