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 =========================================================================*/
38 #ifndef vtkMassProperties_h
39 #define vtkMassProperties_h
40 
41 #include "vtkFiltersCoreModule.h" // For export macro
42 #include "vtkPolyDataAlgorithm.h"
43 
45 {
46 public:
48  static vtkMassProperties *New();
49 
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54  double GetVolume() {this->Update(); return this->Volume;}
55 
61  double GetVolumeProjected() {this->Update(); return this->VolumeProjected;}
62 
64 
66  double GetVolumeX() {this->Update(); return this->VolumeX;}
67  double GetVolumeY() {this->Update(); return this->VolumeY;}
68  double GetVolumeZ() {this->Update(); return this->VolumeZ;}
70 
72 
74  double GetKx() {this->Update(); return this->Kx;}
75  double GetKy() {this->Update(); return this->Ky;}
76  double GetKz() {this->Update(); return this->Kz;}
78 
80  double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
81 
83  double GetMinCellArea() {this->Update(); return this->MinCellArea;}
84 
86  double GetMaxCellArea() {this->Update(); return this->MaxCellArea;}
87 
89 
93  {this->Update(); return this->NormalizedShapeIndex;}
95 
96 protected:
99 
100  virtual int RequestData(vtkInformation* request,
101  vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector);
103 
104  double SurfaceArea;
105  double MinCellArea;
106  double MaxCellArea;
107  double Volume;
108  double VolumeProjected; // == Projected area of triangles * average z values
109  double VolumeX;
110  double VolumeY;
111  double VolumeZ;
112  double Kx;
113  double Ky;
114  double Kz;
116 
117 private:
118  vtkMassProperties(const vtkMassProperties&); // Not implemented.
119  void operator=(const vtkMassProperties&); // Not implemented.
120 };
121 
122 #endif
123 
124 
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
double GetNormalizedShapeIndex()
#define VTKFILTERSCORE_EXPORT
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void Update()
Store zero or more vtkInformation instances.
estimate volume, area, shape index of triangle mesh