VTK  9.4.20241217
vtkMassProperties.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
50#ifndef vtkMassProperties_h
51#define vtkMassProperties_h
52
53#include "vtkFiltersCoreModule.h" // For export macro
55
56VTK_ABI_NAMESPACE_BEGIN
57class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
58{
59public:
64
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
71 double GetVolume()
72 {
73 this->Update();
74 return this->Volume;
75 }
76
86 {
87 this->Update();
88 return this->VolumeProjected;
89 }
90
94 double GetVolumeX()
95 {
96 this->Update();
97 return this->VolumeX;
98 }
99 double GetVolumeY()
100 {
101 this->Update();
102 return this->VolumeY;
103 }
104 double GetVolumeZ()
105 {
106 this->Update();
107 return this->VolumeZ;
108 }
109
114 double GetKx()
115 {
116 this->Update();
117 return this->Kx;
118 }
119 double GetKy()
120 {
121 this->Update();
122 return this->Ky;
123 }
124 double GetKz()
125 {
126 this->Update();
127 return this->Kz;
128 }
129
134 {
135 this->Update();
136 return this->SurfaceArea;
137 }
138
143 {
144 this->Update();
145 return this->MinCellArea;
146 }
147
152 {
153 this->Update();
154 return this->MaxCellArea;
155 }
156
163 {
164 this->Update();
165 return this->NormalizedShapeIndex;
166 }
167
168protected:
171
173 vtkInformationVector* outputVector) override;
174
178 double Volume;
179 double VolumeProjected; // == Projected area of triangles * average z values
180 double VolumeX;
181 double VolumeY;
182 double VolumeZ;
183 double Kx;
184 double Ky;
185 double Kz;
187
188private:
189 vtkMassProperties(const vtkMassProperties&) = delete;
190 void operator=(const vtkMassProperties&) = delete;
191};
192
193VTK_ABI_NAMESPACE_END
194#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
estimate volume, area, shape index of triangle mesh
double GetSurfaceArea()
Compute and return the area.
double GetVolumeProjected()
Compute and return the projected volume.
double GetNormalizedShapeIndex()
Compute and return the normalized shape index.
static vtkMassProperties * New()
Constructs with initial values of zero.
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
double GetMinCellArea()
Compute and return the min cell area.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetVolume()
Compute and return the volume.
~vtkMassProperties() override
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
double GetMaxCellArea()
Compute and return the max cell area.
Superclass for algorithms that produce only polydata as output.