VTK  9.2.6
vtkMultiObjectMassProperties.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMultiObjectMassProperties.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=========================================================================*/
93
94#ifndef vtkMultiObjectMassProperties_h
95#define vtkMultiObjectMassProperties_h
96
97#include "vtkFiltersCoreModule.h" // For export macro
99
100class vtkDoubleArray;
102class vtkIdTypeArray;
103
104class VTKFILTERSCORE_EXPORT vtkMultiObjectMassProperties : public vtkPolyDataAlgorithm
105{
106public:
108
113 void PrintSelf(ostream& os, vtkIndent indent) override;
115
117
127
129
137
145
150 vtkTypeBool GetAllValid() { return this->AllValid; }
151
156 double GetTotalVolume() { return this->TotalVolume; }
157
162 double GetTotalArea() { return this->TotalArea; }
163
164protected:
167
169 vtkInformationVector* outputVector) override;
170
171 // Data members supporting API
175 double TotalArea;
176
177 // Internal data members supporting algorithm execution
178 vtkIdType NumberOfObjects; // number of objects identified
179 vtkIdTypeArray* ObjectIds; // for each input polygon, the object id that the polygon is in
180 std::string ObjectIdsArrayName; // the array name of ObjectIds.
181
182 vtkUnsignedCharArray* ObjectValidity; // is it a valid object?
183 vtkDoubleArray* ObjectVolumes; // what is the object volume (if valid)?
184 vtkDoubleArray* ObjectAreas; // what is the total object area?
185 vtkDoubleArray* ObjectCentroids; // what is the object centroid
186
187 vtkIdList* CellNeighbors; // avoid repetitive new/delete
188 vtkIdList* Wave; // processing wave
190
191 // Connected traversal to identify objects
193 vtkPolyData* output, vtkIdType* objectIds, vtkDataArray* valid, unsigned char* orient);
194
195private:
197 void operator=(const vtkMultiObjectMassProperties&) = delete;
198};
199
200#endif
dynamic, self-adjusting array of double
list of point or cell ids
Definition vtkIdList.h:34
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
vtkSetStdStringFromCharMacro(ObjectIdsArrayName)
Set/Get the name of the ObjectIds array.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
~vtkMultiObjectMassProperties() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type and printing.
vtkGetCharFromStdStringMacro(ObjectIdsArrayName)
Set/Get the name of the ObjectIds array.
void TraverseAndMark(vtkPolyData *output, vtkIdType *objectIds, vtkDataArray *valid, unsigned char *orient)
double GetTotalArea()
Return the summed area of all objects.
vtkIdType GetNumberOfObjects()
Return the number of objects identified.
double GetTotalVolume()
Return the summed volume of all objects.
static vtkMultiObjectMassProperties * New()
Standard methods for construction, type and printing.
vtkTypeBool GetAllValid()
Return whether all objects are valid or not.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:69
#define vtkDataArray
int vtkIdType
Definition vtkType.h:332