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 =========================================================================*/
36 #ifndef vtkMassProperties_h
37 #define vtkMassProperties_h
38 
39 #include "vtkFiltersCoreModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41 
42 class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
43 {
44 public:
48  static vtkMassProperties *New();
49 
51  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
52 
56  double GetVolume() {this->Update(); return this->Volume;}
57 
66  double GetVolumeProjected() {this->Update(); return this->VolumeProjected;}
67 
71  double GetVolumeX() {this->Update(); return this->VolumeX;}
72  double GetVolumeY() {this->Update(); return this->VolumeY;}
73  double GetVolumeZ() {this->Update(); return this->VolumeZ;}
74 
79  double GetKx() {this->Update(); return this->Kx;}
80  double GetKy() {this->Update(); return this->Ky;}
81  double GetKz() {this->Update(); return this->Kz;}
82 
86  double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
87 
91  double GetMinCellArea() {this->Update(); return this->MinCellArea;}
92 
96  double GetMaxCellArea() {this->Update(); return this->MaxCellArea;}
97 
104  {this->Update(); return this->NormalizedShapeIndex;}
105 
106 protected:
108  ~vtkMassProperties() VTK_OVERRIDE;
109 
110  int RequestData(vtkInformation* request,
111  vtkInformationVector** inputVector,
112  vtkInformationVector* outputVector) VTK_OVERRIDE;
113 
114  double SurfaceArea;
115  double MinCellArea;
116  double MaxCellArea;
117  double Volume;
118  double VolumeProjected; // == Projected area of triangles * average z values
119  double VolumeX;
120  double VolumeY;
121  double VolumeZ;
122  double Kx;
123  double Ky;
124  double Kz;
126 
127 private:
128  vtkMassProperties(const vtkMassProperties&) VTK_DELETE_FUNCTION;
129  void operator=(const vtkMassProperties&) VTK_DELETE_FUNCTION;
130 };
131 
132 #endif
133 
134 
double GetMaxCellArea()
Compute and return the max cell area.
double GetMinCellArea()
Compute and return the min cell area.
Store vtkAlgorithm input/output information.
double GetVolume()
Compute and return the volume.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
double GetNormalizedShapeIndex()
Compute and return the normalized shape index.
double GetVolumeProjected()
Compute and return the projected volume.
double GetKx()
Compute and return the weighting factors for the maximum unit normal component (MUNC).
double GetSurfaceArea()
Compute and return the area.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
double GetVolumeX()
Compute and return the volume projected on to each axis aligned plane.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual void Update()
Bring this algorithm's outputs up-to-date.
Store zero or more vtkInformation instances.
estimate volume, area, shape index of triangle mesh
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.