/usr/include/vtk-7.1/vtkMassProperties.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkMassProperties.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkMassProperties
* @brief estimate volume, area, shape index of triangle mesh
*
* vtkMassProperties estimates the volume, the surface area, and the
* normalized shape index of a triangle mesh. The algorithm
* implemented here is based on the discrete form of the divergence
* theorem. The general assumption here is that the model is of
* closed surface. For more details see the following reference
* (Alyassin A.M. et al, "Evaluation of new algorithms for the
* interactive measurement of surface area and volume", Med Phys 21(6)
* 1994.).
*
* @warning
* Currently only triangles are processed. Use vtkTriangleFilter to
* convert any strips or polygons to triangles.
*
* @sa
* vtkTriangleFilter
*/
#ifndef vtkMassProperties_h
#define vtkMassProperties_h
#include "vtkFiltersCoreModule.h" // For export macro
#include "vtkPolyDataAlgorithm.h"
class VTKFILTERSCORE_EXPORT vtkMassProperties : public vtkPolyDataAlgorithm
{
public:
/**
* Constructs with initial values of zero.
*/
static vtkMassProperties *New();
vtkTypeMacro(vtkMassProperties,vtkPolyDataAlgorithm);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Compute and return the volume.
*/
double GetVolume() {this->Update(); return this->Volume;}
/**
* Compute and return the projected volume.
* Typically you should compare this volume to the value returned by GetVolume
* if you get an error (GetVolume()-GetVolumeProjected())*10000 that is greater
* than GetVolume() this should identify a problem:
* * Either the polydata is not closed
* * Or the polydata contains triangle that are flipped
*/
double GetVolumeProjected() {this->Update(); return this->VolumeProjected;}
/**
* Compute and return the volume projected on to each axis aligned plane.
*/
double GetVolumeX() {this->Update(); return this->VolumeX;}
double GetVolumeY() {this->Update(); return this->VolumeY;}
double GetVolumeZ() {this->Update(); return this->VolumeZ;}
/**
* Compute and return the weighting factors for the maximum unit
* normal component (MUNC).
*/
double GetKx() {this->Update(); return this->Kx;}
double GetKy() {this->Update(); return this->Ky;}
double GetKz() {this->Update(); return this->Kz;}
/**
* Compute and return the area.
*/
double GetSurfaceArea() {this->Update(); return this->SurfaceArea;}
/**
* Compute and return the min cell area.
*/
double GetMinCellArea() {this->Update(); return this->MinCellArea;}
/**
* Compute and return the max cell area.
*/
double GetMaxCellArea() {this->Update(); return this->MaxCellArea;}
/**
* Compute and return the normalized shape index. This characterizes the
* deviation of the shape of an object from a sphere. A sphere's NSI
* is one. This number is always >= 1.0.
*/
double GetNormalizedShapeIndex()
{this->Update(); return this->NormalizedShapeIndex;}
protected:
vtkMassProperties();
~vtkMassProperties() VTK_OVERRIDE;
int RequestData(vtkInformation* request,
vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_OVERRIDE;
double SurfaceArea;
double MinCellArea;
double MaxCellArea;
double Volume;
double VolumeProjected; // == Projected area of triangles * average z values
double VolumeX;
double VolumeY;
double VolumeZ;
double Kx;
double Ky;
double Kz;
double NormalizedShapeIndex;
private:
vtkMassProperties(const vtkMassProperties&) VTK_DELETE_FUNCTION;
void operator=(const vtkMassProperties&) VTK_DELETE_FUNCTION;
};
#endif
|