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 =========================================================================*/
39 #ifndef vtkMassProperties_h
40 #define vtkMassProperties_h
41 
42 #include "vtkFiltersCoreModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
46 {
47 public:
52 
54  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
55 
59  double GetVolume() {this->Update(); return this->Volume;}
60 
69  double GetVolumeProjected() {this->Update(); return this->VolumeProjected;}
70 
74  double GetVolumeX() {this->Update(); return this->VolumeX;}
75  double GetVolumeY() {this->Update(); return this->VolumeY;}
76  double GetVolumeZ() {this->Update(); return this->VolumeZ;}
77 
82  double GetKx() {this->Update(); return this->Kx;}
83  double GetKy() {this->Update(); return this->Ky;}
84  double GetKz() {this->Update(); return this->Kz;}
85 
89  double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
90 
94  double GetMinCellArea() {this->Update(); return this->MinCellArea;}
95 
99  double GetMaxCellArea() {this->Update(); return this->MaxCellArea;}
100 
107  {this->Update(); return this->NormalizedShapeIndex;}
108 
109 protected:
111  ~vtkMassProperties() VTK_OVERRIDE;
112 
113  int RequestData(vtkInformation* request,
114  vtkInformationVector** inputVector,
115  vtkInformationVector* outputVector) VTK_OVERRIDE;
116 
117  double SurfaceArea;
118  double MinCellArea;
119  double MaxCellArea;
120  double Volume;
121  double VolumeProjected; // == Projected area of triangles * average z values
122  double VolumeX;
123  double VolumeY;
124  double VolumeZ;
125  double Kx;
126  double Ky;
127  double Kz;
128  double NormalizedShapeIndex;
129 
130 private:
131  vtkMassProperties(const vtkMassProperties&) VTK_DELETE_FUNCTION;
132  void operator=(const vtkMassProperties&) VTK_DELETE_FUNCTION;
133 };
134 
135 #endif
136 
137 
vtkMassProperties::GetVolume
double GetVolume()
Compute and return the volume.
Definition: vtkMassProperties.h:59
vtkMassProperties::GetMaxCellArea
double GetMaxCellArea()
Compute and return the max cell area.
Definition: vtkMassProperties.h:99
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkMassProperties::GetKz
double GetKz()
Definition: vtkMassProperties.h:84
vtkMassProperties::GetNormalizedShapeIndex
double GetNormalizedShapeIndex()
Compute and return the normalized shape index.
Definition: vtkMassProperties.h:106
vtkMassProperties::GetSurfaceArea
double GetSurfaceArea()
Compute and return the area.
Definition: vtkMassProperties.h:89
vtkMassProperties::GetVolumeZ
double GetVolumeZ()
Definition: vtkMassProperties.h:76
vtkPolyDataAlgorithm.h
vtkMassProperties::GetKx
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
Definition: vtkMassProperties.h:82
vtkMassProperties::GetVolumeX
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
Definition: vtkMassProperties.h:74
vtkMassProperties::GetKy
double GetKy()
Definition: vtkMassProperties.h:83
vtkMassProperties::New
static vtkMassProperties * New()
Constructs with initial values of zero.
vtkMassProperties::GetVolumeProjected
double GetVolumeProjected()
Compute and return the projected volume.
Definition: vtkMassProperties.h:69
vtkMassProperties::~vtkMassProperties
~vtkMassProperties() override
vtkAlgorithm::Update
virtual void Update()
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:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkMassProperties::GetVolumeY
double GetVolumeY()
Definition: vtkMassProperties.h:75
vtkMassProperties
estimate volume, area, shape index of triangle mesh
Definition: vtkMassProperties.h:46
vtkMassProperties::vtkMassProperties
vtkMassProperties()
vtkMassProperties::GetMinCellArea
double GetMinCellArea()
Compute and return the min cell area.
Definition: vtkMassProperties.h:94
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:45