VTK  9.2.6
vtkCellSizeFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCellSizeFilter.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=========================================================================*/
40
41#ifndef vtkCellSizeFilter_h
42#define vtkCellSizeFilter_h
43
44#include "vtkFiltersVerdictModule.h" // For export macro
46
47class vtkDataSet;
48class vtkDoubleArray;
49class vtkIdList;
50class vtkImageData;
51class vtkPointSet;
52
53class VTKFILTERSVERDICT_EXPORT vtkCellSizeFilter : public vtkPassInputTypeAlgorithm
54{
55public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
66 vtkSetMacro(ComputeVertexCount, bool);
67 vtkGetMacro(ComputeVertexCount, bool);
68 vtkBooleanMacro(ComputeVertexCount, bool);
70
72
77 vtkSetMacro(ComputeLength, bool);
78 vtkGetMacro(ComputeLength, bool);
79 vtkBooleanMacro(ComputeLength, bool);
81
83
88 vtkSetMacro(ComputeArea, bool);
89 vtkGetMacro(ComputeArea, bool);
90 vtkBooleanMacro(ComputeArea, bool);
92
94
99 vtkSetMacro(ComputeVolume, bool);
100 vtkGetMacro(ComputeVolume, bool);
101 vtkBooleanMacro(ComputeVolume, bool);
103
105
109 vtkSetMacro(ComputeSum, bool);
110 vtkGetMacro(ComputeSum, bool);
111 vtkBooleanMacro(ComputeSum, bool);
113
115
119 vtkSetStringMacro(VertexCountArrayName);
120 vtkGetStringMacro(VertexCountArrayName);
121 vtkSetStringMacro(LengthArrayName);
122 vtkGetStringMacro(LengthArrayName);
123 vtkSetStringMacro(AreaArrayName);
124 vtkGetStringMacro(AreaArrayName);
125 vtkSetStringMacro(VolumeArrayName);
126 vtkGetStringMacro(VolumeArrayName);
128
129protected:
132
134 vtkInformationVector* outputVector) override;
135 bool ComputeDataSet(vtkDataSet* input, vtkDataSet* output, double sum[4]);
136
137 void IntegrateImageData(vtkImageData* input, vtkImageData* output, double sum[4]);
138 void ExecuteBlock(vtkDataSet* input, vtkDataSet* output, double sum[4]);
139
141
145 double IntegratePolyLine(vtkDataSet* input, vtkIdList* cellPtIds);
146 double IntegratePolygon(vtkPointSet* input, vtkIdList* cellPtIds);
147 double IntegrateTriangleStrip(vtkPointSet* input, vtkIdList* cellPtIds);
148 double IntegratePixel(vtkDataSet* input, vtkIdList* cellPtIds);
149 double IntegrateVoxel(vtkDataSet* input, vtkIdList* cellPtIds);
150 double IntegrateGeneral1DCell(vtkDataSet* input, vtkIdList* cellPtIds);
151 double IntegrateGeneral2DCell(vtkPointSet* input, vtkIdList* cellPtIds);
152 double IntegrateGeneral3DCell(vtkPointSet* input, vtkIdList* cellPtIds);
154
156
159 void AddSumFieldData(vtkDataObject*, double sum[4]);
161
163
166 virtual void ComputeGlobalSum(double sum[4]) { (void)sum; }
168
169private:
170 vtkCellSizeFilter(const vtkCellSizeFilter&) = delete;
171 void operator=(const vtkCellSizeFilter&) = delete;
172
173 bool ComputeVertexCount;
174 bool ComputeLength;
175 bool ComputeArea;
176 bool ComputeVolume;
177 bool ComputeSum;
178
179 char* VertexCountArrayName;
180 char* LengthArrayName;
181 char* AreaArrayName;
182 char* VolumeArrayName;
183};
184
185#endif
Computes cell sizes.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCellSizeFilter * New()
double IntegratePolygon(vtkPointSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
double IntegrateTriangleStrip(vtkPointSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
double IntegrateVoxel(vtkDataSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
double IntegrateGeneral1DCell(vtkDataSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
void IntegrateImageData(vtkImageData *input, vtkImageData *output, double sum[4])
double IntegratePixel(vtkDataSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
~vtkCellSizeFilter() override
double IntegrateGeneral2DCell(vtkPointSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
double IntegratePolyLine(vtkDataSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
void ExecuteBlock(vtkDataSet *input, vtkDataSet *output, double sum[4])
bool ComputeDataSet(vtkDataSet *input, vtkDataSet *output, double sum[4])
void AddSumFieldData(vtkDataObject *, double sum[4])
Method to add the computed sum to the field data of the data object.
virtual void ComputeGlobalSum(double sum[4])
Method to compute the global sum information.
double IntegrateGeneral3DCell(vtkPointSet *input, vtkIdList *cellPtIds)
Specify whether to sum the computed sizes and put the result in a field data array.
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:63
dynamic, self-adjusting array of double
list of point or cell ids
Definition vtkIdList.h:34
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete class for storing a set of points
Definition vtkPointSet.h:70