VTK
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 =========================================================================*/
41 #ifndef vtkCellSizeFilter_h
42 #define vtkCellSizeFilter_h
43 
44 #include "vtkFiltersVerdictModule.h" // For export macro
46 
47 class vtkDataSet;
48 class vtkDoubleArray;
49 class vtkIdList;
50 class vtkImageData;
51 class vtkPointSet;
52 
53 class VTKFILTERSVERDICT_EXPORT vtkCellSizeFilter : public vtkPassInputTypeAlgorithm
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58  static vtkCellSizeFilter* New();
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 
129 protected:
131  ~vtkCellSizeFilter() override;
132 
133  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
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 
169 private:
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.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:42
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
list of point or cell ids
Definition: vtkIdList.h:36
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64
virtual void ComputeGlobalSum(double sum[4])
Method to compute the global sum information.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()