VTK
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
47 #include "vtkPolyDataAlgorithm.h"
48 
49 class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
50 {
51 public:
55  static vtkMassProperties *New();
56 
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  double GetVolume() {this->Update(); return this->Volume;}
64 
73  double GetVolumeProjected() {this->Update(); return this->VolumeProjected;}
74 
78  double GetVolumeX() {this->Update(); return this->VolumeX;}
79  double GetVolumeY() {this->Update(); return this->VolumeY;}
80  double GetVolumeZ() {this->Update(); return this->VolumeZ;}
81 
86  double GetKx() {this->Update(); return this->Kx;}
87  double GetKy() {this->Update(); return this->Ky;}
88  double GetKz() {this->Update(); return this->Kz;}
89 
93  double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
94 
98  double GetMinCellArea() {this->Update(); return this->MinCellArea;}
99 
103  double GetMaxCellArea() {this->Update(); return this->MaxCellArea;}
104 
111  {this->Update(); return this->NormalizedShapeIndex;}
112 
113 protected:
115  ~vtkMassProperties() override;
116 
117  int RequestData(vtkInformation* request,
118  vtkInformationVector** inputVector,
119  vtkInformationVector* outputVector) override;
120 
121  double SurfaceArea;
122  double MinCellArea;
123  double MaxCellArea;
124  double Volume;
125  double VolumeProjected; // == Projected area of triangles * average z values
126  double VolumeX;
127  double VolumeY;
128  double VolumeZ;
129  double Kx;
130  double Ky;
131  double Kz;
133 
134 private:
135  vtkMassProperties(const vtkMassProperties&) = delete;
136  void operator=(const vtkMassProperties&) = delete;
137 };
138 
139 #endif
vtkMassProperties::GetVolume
double GetVolume()
Compute and return the volume.
Definition: vtkMassProperties.h:63
vtkMassProperties::VolumeZ
double VolumeZ
Definition: vtkMassProperties.h:128
vtkMassProperties::MinCellArea
double MinCellArea
Definition: vtkMassProperties.h:122
vtkMassProperties::Kx
double Kx
Definition: vtkMassProperties.h:129
vtkMassProperties::GetMaxCellArea
double GetMaxCellArea()
Compute and return the max cell area.
Definition: vtkMassProperties.h:103
vtkMassProperties::Volume
double Volume
Definition: vtkMassProperties.h:124
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkMassProperties::VolumeProjected
double VolumeProjected
Definition: vtkMassProperties.h:125
vtkMassProperties::GetKz
double GetKz()
Definition: vtkMassProperties.h:88
vtkMassProperties::MaxCellArea
double MaxCellArea
Definition: vtkMassProperties.h:123
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:110
vtkMassProperties::GetSurfaceArea
double GetSurfaceArea()
Compute and return the area.
Definition: vtkMassProperties.h:93
vtkMassProperties::GetVolumeZ
double GetVolumeZ()
Definition: vtkMassProperties.h:80
vtkPolyDataAlgorithm.h
vtkMassProperties::GetKx
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
Definition: vtkMassProperties.h:86
vtkMassProperties::GetVolumeX
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
Definition: vtkMassProperties.h:78
vtkMassProperties::GetKy
double GetKy()
Definition: vtkMassProperties.h:87
vtkMassProperties::GetVolumeProjected
double GetVolumeProjected()
Compute and return the projected volume.
Definition: vtkMassProperties.h:73
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:127
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkMassProperties::VolumeX
double VolumeX
Definition: vtkMassProperties.h:126
vtkMassProperties::Ky
double Ky
Definition: vtkMassProperties.h:130
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkMassProperties::GetVolumeY
double GetVolumeY()
Definition: vtkMassProperties.h:79
vtkMassProperties::Kz
double Kz
Definition: vtkMassProperties.h:131
vtkMassProperties
estimate volume, area, shape index of triangle mesh
Definition: vtkMassProperties.h:49
vtkMassProperties::NormalizedShapeIndex
double NormalizedShapeIndex
Definition: vtkMassProperties.h:132
vtkMassProperties::SurfaceArea
double SurfaceArea
Definition: vtkMassProperties.h:121
vtkMassProperties::GetMinCellArea
double GetMinCellArea()
Compute and return the min cell area.
Definition: vtkMassProperties.h:98
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:44