VTK  9.1.0
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 =========================================================================*/
59 #ifndef vtkMassProperties_h
60 #define vtkMassProperties_h
61 
62 #include "vtkFiltersCoreModule.h" // For export macro
63 #include "vtkPolyDataAlgorithm.h"
64 
65 class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
66 {
67 public:
72 
74  void PrintSelf(ostream& os, vtkIndent indent) override;
75 
79  double GetVolume()
80  {
81  this->Update();
82  return this->Volume;
83  }
84 
94  {
95  this->Update();
96  return this->VolumeProjected;
97  }
98 
102  double GetVolumeX()
103  {
104  this->Update();
105  return this->VolumeX;
106  }
107  double GetVolumeY()
108  {
109  this->Update();
110  return this->VolumeY;
111  }
112  double GetVolumeZ()
113  {
114  this->Update();
115  return this->VolumeZ;
116  }
117 
122  double GetKx()
123  {
124  this->Update();
125  return this->Kx;
126  }
127  double GetKy()
128  {
129  this->Update();
130  return this->Ky;
131  }
132  double GetKz()
133  {
134  this->Update();
135  return this->Kz;
136  }
137 
141  double GetSurfaceArea()
142  {
143  this->Update();
144  return this->SurfaceArea;
145  }
146 
150  double GetMinCellArea()
151  {
152  this->Update();
153  return this->MinCellArea;
154  }
155 
159  double GetMaxCellArea()
160  {
161  this->Update();
162  return this->MaxCellArea;
163  }
164 
171  {
172  this->Update();
173  return this->NormalizedShapeIndex;
174  }
175 
176 protected:
178  ~vtkMassProperties() override;
179 
180  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
181  vtkInformationVector* outputVector) override;
182 
183  double SurfaceArea;
184  double MinCellArea;
185  double MaxCellArea;
186  double Volume;
187  double VolumeProjected; // == Projected area of triangles * average z values
188  double VolumeX;
189  double VolumeY;
190  double VolumeZ;
191  double Kx;
192  double Ky;
193  double Kz;
195 
196 private:
197  vtkMassProperties(const vtkMassProperties&) = delete;
198  void operator=(const vtkMassProperties&) = delete;
199 };
200 
201 #endif
vtkMassProperties::GetVolume
double GetVolume()
Compute and return the volume.
Definition: vtkMassProperties.h:79
vtkMassProperties::VolumeZ
double VolumeZ
Definition: vtkMassProperties.h:190
vtkMassProperties::MinCellArea
double MinCellArea
Definition: vtkMassProperties.h:184
vtkMassProperties::Kx
double Kx
Definition: vtkMassProperties.h:191
vtkMassProperties::GetMaxCellArea
double GetMaxCellArea()
Compute and return the max cell area.
Definition: vtkMassProperties.h:159
vtkMassProperties::Volume
double Volume
Definition: vtkMassProperties.h:186
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkMassProperties::VolumeProjected
double VolumeProjected
Definition: vtkMassProperties.h:187
vtkMassProperties::GetKz
double GetKz()
Definition: vtkMassProperties.h:132
vtkMassProperties::MaxCellArea
double MaxCellArea
Definition: vtkMassProperties.h:185
vtkMassProperties::GetNormalizedShapeIndex
double GetNormalizedShapeIndex()
Compute and return the normalized shape index.
Definition: vtkMassProperties.h:170
vtkMassProperties::GetSurfaceArea
double GetSurfaceArea()
Compute and return the area.
Definition: vtkMassProperties.h:141
vtkMassProperties::GetVolumeZ
double GetVolumeZ()
Definition: vtkMassProperties.h:112
vtkPolyDataAlgorithm.h
vtkMassProperties::GetKx
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
Definition: vtkMassProperties.h:122
vtkMassProperties::GetVolumeX
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
Definition: vtkMassProperties.h:102
vtkMassProperties::GetKy
double GetKy()
Definition: vtkMassProperties.h:127
vtkMassProperties::New
static vtkMassProperties * New()
Constructs with initial values of zero.
vtkMassProperties::GetVolumeProjected
double GetVolumeProjected()
Compute and return the projected volume.
Definition: vtkMassProperties.h:93
vtkMassProperties::~vtkMassProperties
~vtkMassProperties() override
vtkAlgorithm::Update
virtual void Update()
Bring this algorithm's outputs up-to-date.
vtkMassProperties::VolumeY
double VolumeY
Definition: vtkMassProperties.h:189
vtkMassProperties::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkMassProperties::VolumeX
double VolumeX
Definition: vtkMassProperties.h:188
vtkMassProperties::Ky
double Ky
Definition: vtkMassProperties.h:192
vtkMassProperties::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkMassProperties::GetVolumeY
double GetVolumeY()
Definition: vtkMassProperties.h:107
vtkMassProperties::Kz
double Kz
Definition: vtkMassProperties.h:193
vtkMassProperties
estimate volume, area, shape index of triangle mesh
Definition: vtkMassProperties.h:66
vtkMassProperties::NormalizedShapeIndex
double NormalizedShapeIndex
Definition: vtkMassProperties.h:194
vtkMassProperties::SurfaceArea
double SurfaceArea
Definition: vtkMassProperties.h:183
vtkMassProperties::vtkMassProperties
vtkMassProperties()
vtkMassProperties::GetMinCellArea
double GetMinCellArea()
Compute and return the min cell area.
Definition: vtkMassProperties.h:150
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151