VTK  9.6.20260321
vtkGeometryFilterDispatcher.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
3// SPDX-License-Identifier: BSD-3-Clause
14
15#ifndef vtkGeometryFilterDispatcher_h
16#define vtkGeometryFilterDispatcher_h
17
19#include "vtkFiltersParallelModule.h" // needed for export macro
20#include "vtkSmartPointer.h" // needed for vtkSmartPointer
21
22#include "vtkNew.h" // for vtkNew
23
24VTK_ABI_NAMESPACE_BEGIN
25
27class vtkCellGrid;
28class vtkDataSet;
32class vtkFeatureEdges;
37class vtkImageData;
42class vtkPolyData;
49
50class VTKFILTERSPARALLEL_EXPORT vtkGeometryFilterDispatcher : public vtkDataObjectAlgorithm
51{
52public:
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
58
62 vtkGetMacro(OutlineFlag, bool);
64
66
69 vtkSetMacro(UseOutline, bool);
70 vtkGetMacro(UseOutline, bool);
71 vtkBooleanMacro(UseOutline, bool);
73
75
80 vtkGetMacro(GenerateFeatureEdges, bool);
82
84
87 vtkSetMacro(BlockColorsDistinctValues, int);
88 vtkGetMacro(BlockColorsDistinctValues, int);
90
92
98 vtkGetMacro(GenerateCellNormals, bool);
99 vtkBooleanMacro(GenerateCellNormals, bool);
101
103
109 vtkGetMacro(GeneratePointNormals, bool);
110 vtkBooleanMacro(GeneratePointNormals, bool);
112
114
121 void SetFeatureAngle(double);
122 vtkGetMacro(FeatureAngle, double);
124
126
131 void SetSplitting(bool);
132 vtkGetMacro(Splitting, bool);
133 vtkBooleanMacro(Splitting, bool);
135
137
143 vtkSetMacro(Triangulate, bool);
144 vtkGetMacro(Triangulate, bool);
145 vtkBooleanMacro(Triangulate, bool);
147
149
157 vtkGetMacro(NonlinearSubdivisionLevel, int);
159
161
170
172
178
180
186 vtkGetMacro(PassThroughCellIds, bool);
187 vtkBooleanMacro(PassThroughCellIds, bool);
189
191
197 vtkGetMacro(PassThroughPointIds, bool);
198 vtkBooleanMacro(PassThroughPointIds, bool);
200
202
205 vtkSetMacro(GenerateProcessIds, bool);
206 vtkGetMacro(GenerateProcessIds, bool);
207 vtkBooleanMacro(GenerateProcessIds, bool);
209
211
217 vtkSetMacro(HideInternalAMRFaces, bool);
218 vtkGetMacro(HideInternalAMRFaces, bool);
219 vtkBooleanMacro(HideInternalAMRFaces, bool);
221
223
237
238protected:
241
243
248 virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
249 vtkInformationVector* outputVector);
250 virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
251 vtkInformationVector* outputVector);
253 vtkInformationVector* outputVector) override;
255
261 void ExecuteAMRBlock(vtkCartesianGrid* input, vtkPolyData* output, const bool extractface[6]);
262
267 const double bounds[6], vtkPolyData* output, const bool extractface[6]);
268
269 void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, bool doCommunicate, int updatePiece,
270 int updateNumPieces, int updateGhosts, const int* wholeExtent);
271
272 void DataSetExecute(vtkDataSet* input, vtkPolyData* output, bool doCommunicate);
273 void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, bool doCommunicate);
274
276 vtkImageData* input, vtkPolyData* output, bool doCommunicate, int updatePiece, const int* ext);
277
278 void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
279 int updateNumPieces, int updateGhosts, const int* wholeExtent);
280
281 void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
282 int updateNumPieces, int updateGhosts, const int* wholeExtent);
283
285 vtkUnstructuredGridBase* input, vtkPolyData* output, bool doCommunicate);
286
287 void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, bool doCommunicate);
288
289 void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, bool doCommunicate);
290
292 vtkExplicitStructuredGrid* input, vtkPolyData* out, bool doCommunicate, const int* wholeExtent);
293
294 void CellGridExecute(vtkCellGrid* input, vtkPolyData* output, bool doCommunicate);
295
297
303
304 bool OutlineFlag = false;
305 bool UseOutline = true;
309 bool Splitting = true;
310 double FeatureAngle = 30.0;
311 bool Triangulate = false;
314
323
329
330 // Callback for recording progress of internal filters.
331 void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
332
334
336
337 bool GenerateProcessIds = false;
343
344private:
346 void operator=(const vtkGeometryFilterDispatcher&) = delete;
347
353 void AddDataObjectTreeArrays(vtkDataObjectTree* realInput, vtkDataObjectTree* output);
354
358 void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
360
366 void AddBlockColors(vtkDataObject* pd, unsigned int index);
367 void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
368 class BoundsReductionOperation;
370
379 void GenerateFeatureEdgesHTG(vtkHyperTreeGrid* input, vtkPolyData* output);
380
384 void ExecuteNormalsComputation(vtkPolyData* output);
385
390 void GenerateProcessIdsArrays(vtkPolyData* output);
391
396 bool UseCacheIfPossible(vtkDataObject* input, vtkDataObject* output);
397
401 void UpdateCache(vtkDataObject* output);
402
411 vtkSmartPointer<vtkDataObjectTree> GetDataObjectTreeInput(vtkInformationVector** inputVector);
412
414};
415
416VTK_ABI_NAMESPACE_END
417
418#endif
Abstract API for vtkImageData and vtkRectilinearGrid.
Visualization data composed of cells of arbitrary type.
Definition vtkCellGrid.h:49
vtkDataObjectMeshCache is a class to store and reuse the mesh of a vtkDataSet, while forwarding data ...
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
structured grid with explicit topology and geometry
extract interior, boundary, non-manifold, and/or sharp edges from polygonal data
Detect and break reference loops.
defines dataset interface
extract geometry from data (or convert data to polygonal type)
vtkMultiProcessController * Controller
vtkSmartPointer< vtkUnstructuredGridGeometryFilter > UnstructuredGridGeometryFilter
void RectilinearGridExecute(vtkRectilinearGrid *input, vtkPolyData *output, int updatePiece, int updateNumPieces, int updateGhosts, const int *wholeExtent)
void PolyDataExecute(vtkPolyData *input, vtkPolyData *output, bool doCommunicate)
void SetFeatureAngle(double)
Specify the angle that defines a sharp edge.
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
void SetSplitting(bool)
Turn on/off the splitting of sharp edges.
void ExplicitStructuredGridExecute(vtkExplicitStructuredGrid *input, vtkPolyData *out, bool doCommunicate, const int *wholeExtent)
void GenericDataSetExecute(vtkGenericDataSet *input, vtkPolyData *output, bool doCommunicate)
vtkSmartPointer< vtkGeometryFilter > GeometryFilter
void CleanupOutputData(vtkPolyData *output)
Cleans up the output polydata.
void HandleGeometryFilterProgress(vtkObject *caller, unsigned long, void *)
void SetGeneratePointNormals(bool)
Whether to generate point normals.
void SetPassThroughPointIds(bool)
If on, the output polygonal dataset will have a pointdata array that holds the point index of the ori...
virtual int RequestAMRData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to create vtkMultiBlockDataSet when input is a composite-dataset and vtkPolyData when inpu...
vtkSmartPointer< vtkPolyDataNormals > PolyDataNormals
void UnstructuredGridExecute(vtkUnstructuredGridBase *input, vtkPolyData *output, bool doCommunicate)
vtkSmartPointer< vtkOutlineSource > OutlineSource
void HyperTreeGridExecute(vtkHyperTreeGrid *input, vtkPolyData *output, bool doCommunicate)
vtkSmartPointer< vtkFeatureEdges > FeatureEdgesFilter
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Overridden to create vtkMultiBlockDataSet when input is a composite-dataset and vtkPolyData when inpu...
~vtkGeometryFilterDispatcher() override
virtual void SetController(vtkMultiProcessController *)
Set and get the controller.
virtual void SetMatchBoundariesIgnoringCellOrder(int)
When two volumetric cells of different order are connected by their corners (for instance,...
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to create vtkMultiBlockDataSet when input is a composite-dataset and vtkPolyData when inpu...
void ExecuteAMRBlockOutline(const double bounds[6], vtkPolyData *output, const bool extractface[6])
Used instead of ExecuteAMRBlock() when this->UseOutline is true.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CellGridExecute(vtkCellGrid *input, vtkPolyData *output, bool doCommunicate)
void SetGenerateFeatureEdges(bool)
Set/get whether to produce feature edges (vs.
void ReportReferences(vtkGarbageCollector *) override
virtual int RequestDataObjectTree(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to create vtkMultiBlockDataSet when input is a composite-dataset and vtkPolyData when inpu...
int CheckAttributes(vtkDataObject *input)
Call CheckAttributes on the input which ensures that all attribute arrays have valid lengths.
void StructuredGridExecute(vtkStructuredGrid *input, vtkPolyData *output, int updatePiece, int updateNumPieces, int updateGhosts, const int *wholeExtent)
void ExecuteAMRBlock(vtkCartesianGrid *input, vtkPolyData *output, const bool extractface[6])
Produce geometry for a block in the dataset.
vtkSmartPointer< vtkGenericGeometryFilter > GenericGeometryFilter
void ExecuteBlock(vtkDataObject *input, vtkPolyData *output, bool doCommunicate, int updatePiece, int updateNumPieces, int updateGhosts, const int *wholeExtent)
void DataSetExecute(vtkDataSet *input, vtkPolyData *output, bool doCommunicate)
void SetPassThroughCellIds(bool)
If on, the output polygonal dataset will have a celldata array that holds the cell index of the origi...
vtkSmartPointer< vtkRecoverGeometryWireframe > RecoverWireframeFilter
void ImageDataExecute(vtkImageData *input, vtkPolyData *output, bool doCommunicate, int updatePiece, const int *ext)
void SetGenerateCellNormals(bool)
Whether to generate cell normals.
virtual void SetNonlinearSubdivisionLevel(int)
Nonlinear faces are approximated with flat polygons.
static vtkGeometryFilterDispatcher * New()
extract boundary geometry from dataset (or convert data to polygonal type)
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Multiprocessing communication superclass.
Allocate and hold a VTK object.
Definition vtkNew.h:167
create wireframe outline around bounding box
concrete dataset represents vertices, lines, polygons, and triangle strips
Get corrected wireframe from tessellated facets.
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types.
extract geometry from an unstructured grid
#define vtkPolyDataNormals