VTK  9.2.6
vtkMassProperties.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMassProperties.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=========================================================================*/
43#ifndef vtkMassProperties_h
44#define vtkMassProperties_h
45
46#include "vtkFiltersCoreModule.h" // For export macro
48
49class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
50{
51public:
56
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
63 double GetVolume()
64 {
65 this->Update();
66 return this->Volume;
67 }
68
78 {
79 this->Update();
80 return this->VolumeProjected;
81 }
82
86 double GetVolumeX()
87 {
88 this->Update();
89 return this->VolumeX;
90 }
91 double GetVolumeY()
92 {
93 this->Update();
94 return this->VolumeY;
95 }
96 double GetVolumeZ()
97 {
98 this->Update();
99 return this->VolumeZ;
100 }
101
106 double GetKx()
107 {
108 this->Update();
109 return this->Kx;
110 }
111 double GetKy()
112 {
113 this->Update();
114 return this->Ky;
115 }
116 double GetKz()
117 {
118 this->Update();
119 return this->Kz;
120 }
121
126 {
127 this->Update();
128 return this->SurfaceArea;
129 }
130
135 {
136 this->Update();
137 return this->MinCellArea;
138 }
139
144 {
145 this->Update();
146 return this->MaxCellArea;
147 }
148
155 {
156 this->Update();
157 return this->NormalizedShapeIndex;
158 }
159
160protected:
163
165 vtkInformationVector* outputVector) override;
166
170 double Volume;
171 double VolumeProjected; // == Projected area of triangles * average z values
172 double VolumeX;
173 double VolumeY;
174 double VolumeZ;
175 double Kx;
176 double Ky;
177 double Kz;
179
180private:
181 vtkMassProperties(const vtkMassProperties&) = delete;
182 void operator=(const vtkMassProperties&) = delete;
183};
184
185#endif
virtual void Update()
Bring this algorithm's outputs up-to-date.
a simple class to control print indentation
Definition vtkIndent.h:40
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.