VTK  9.0.1
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 =========================================================================*/
40 #ifndef vtkMassProperties_h
41 #define vtkMassProperties_h
42 
43 #include "vtkFiltersCoreModule.h" // For export macro
44 #include "vtkPolyDataAlgorithm.h"
45 
46 class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
47 {
48 public:
52  static vtkMassProperties* New();
53 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  double GetVolume()
61  {
62  this->Update();
63  return this->Volume;
64  }
65 
75  {
76  this->Update();
77  return this->VolumeProjected;
78  }
79 
83  double GetVolumeX()
84  {
85  this->Update();
86  return this->VolumeX;
87  }
88  double GetVolumeY()
89  {
90  this->Update();
91  return this->VolumeY;
92  }
93  double GetVolumeZ()
94  {
95  this->Update();
96  return this->VolumeZ;
97  }
98 
103  double GetKx()
104  {
105  this->Update();
106  return this->Kx;
107  }
108  double GetKy()
109  {
110  this->Update();
111  return this->Ky;
112  }
113  double GetKz()
114  {
115  this->Update();
116  return this->Kz;
117  }
118 
122  double GetSurfaceArea()
123  {
124  this->Update();
125  return this->SurfaceArea;
126  }
127 
131  double GetMinCellArea()
132  {
133  this->Update();
134  return this->MinCellArea;
135  }
136 
140  double GetMaxCellArea()
141  {
142  this->Update();
143  return this->MaxCellArea;
144  }
145 
152  {
153  this->Update();
154  return this->NormalizedShapeIndex;
155  }
156 
157 protected:
159  ~vtkMassProperties() override;
160 
161  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
162  vtkInformationVector* outputVector) override;
163 
164  double SurfaceArea;
165  double MinCellArea;
166  double MaxCellArea;
167  double Volume;
168  double VolumeProjected; // == Projected area of triangles * average z values
169  double VolumeX;
170  double VolumeY;
171  double VolumeZ;
172  double Kx;
173  double Ky;
174  double Kz;
176 
177 private:
178  vtkMassProperties(const vtkMassProperties&) = delete;
179  void operator=(const vtkMassProperties&) = delete;
180 };
181 
182 #endif
vtkMassProperties::GetVolume
double GetVolume()
Compute and return the volume.
Definition: vtkMassProperties.h:60
vtkMassProperties::VolumeZ
double VolumeZ
Definition: vtkMassProperties.h:171
vtkMassProperties::MinCellArea
double MinCellArea
Definition: vtkMassProperties.h:165
vtkMassProperties::Kx
double Kx
Definition: vtkMassProperties.h:172
vtkMassProperties::GetMaxCellArea
double GetMaxCellArea()
Compute and return the max cell area.
Definition: vtkMassProperties.h:140
vtkMassProperties::Volume
double Volume
Definition: vtkMassProperties.h:167
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkMassProperties::VolumeProjected
double VolumeProjected
Definition: vtkMassProperties.h:168
vtkMassProperties::GetKz
double GetKz()
Definition: vtkMassProperties.h:113
vtkMassProperties::MaxCellArea
double MaxCellArea
Definition: vtkMassProperties.h:166
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMassProperties::GetNormalizedShapeIndex
double GetNormalizedShapeIndex()
Compute and return the normalized shape index.
Definition: vtkMassProperties.h:151
vtkMassProperties::GetSurfaceArea
double GetSurfaceArea()
Compute and return the area.
Definition: vtkMassProperties.h:122
vtkMassProperties::GetVolumeZ
double GetVolumeZ()
Definition: vtkMassProperties.h:93
vtkPolyDataAlgorithm.h
vtkMassProperties::GetKx
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
Definition: vtkMassProperties.h:103
vtkMassProperties::GetVolumeX
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
Definition: vtkMassProperties.h:83
vtkMassProperties::GetKy
double GetKy()
Definition: vtkMassProperties.h:108
vtkMassProperties::GetVolumeProjected
double GetVolumeProjected()
Compute and return the projected volume.
Definition: vtkMassProperties.h:74
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkAlgorithm::Update
virtual void Update()
vtkMassProperties::VolumeY
double VolumeY
Definition: vtkMassProperties.h:170
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMassProperties::VolumeX
double VolumeX
Definition: vtkMassProperties.h:169
vtkMassProperties::Ky
double Ky
Definition: vtkMassProperties.h:173
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkMassProperties::GetVolumeY
double GetVolumeY()
Definition: vtkMassProperties.h:88
vtkMassProperties::Kz
double Kz
Definition: vtkMassProperties.h:174
vtkMassProperties
estimate volume, area, shape index of triangle mesh
Definition: vtkMassProperties.h:46
vtkMassProperties::NormalizedShapeIndex
double NormalizedShapeIndex
Definition: vtkMassProperties.h:175
vtkMassProperties::SurfaceArea
double SurfaceArea
Definition: vtkMassProperties.h:164
vtkMassProperties::GetMinCellArea
double GetMinCellArea()
Compute and return the min cell area.
Definition: vtkMassProperties.h:131
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41