vtkPVGeometryFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkPVGeometryFilter_h
12 #define vtkPVGeometryFilter_h
13 
14 #include "vtkDataObjectAlgorithm.h"
15 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for export macro
16 
17 class vtkCallbackCommand;
18 class vtkCellGrid;
19 class vtkDataSet;
20 class vtkExplicitStructuredGrid;
21 class vtkFeatureEdges;
22 class vtkGenericDataSet;
24 class vtkGeometryFilter;
25 class vtkHyperTreeGrid;
26 class vtkImageData;
27 class vtkUniformGrid;
31 class vtkOutlineSource;
32 class vtkPolyData;
33 class vtkRecoverGeometryWireframe;
34 class vtkRectilinearGrid;
35 class vtkStructuredGrid;
38 class vtkAMRBox;
39 class vtkOverlappingAMR;
40 
42 {
43 public:
44  static vtkPVGeometryFilter* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
53  vtkGetMacro(OutlineFlag, int);
55 
57 
60  vtkSetMacro(UseOutline, int);
61  vtkGetMacro(UseOutline, int);
63 
65 
69  vtkSetMacro(GenerateFeatureEdges, bool);
70  vtkGetMacro(GenerateFeatureEdges, bool);
72 
74 
77  vtkSetMacro(BlockColorsDistinctValues, int);
78  vtkGetMacro(BlockColorsDistinctValues, int);
80 
82 
87  vtkSetMacro(GenerateCellNormals, int);
88  vtkGetMacro(GenerateCellNormals, int);
89  vtkBooleanMacro(GenerateCellNormals, int);
91 
93 
99  vtkSetMacro(Triangulate, int);
100  vtkGetMacro(Triangulate, int);
101  vtkBooleanMacro(Triangulate, int);
103 
105 
112  virtual void SetNonlinearSubdivisionLevel(int);
113  vtkGetMacro(NonlinearSubdivisionLevel, int);
115 
117 
123  virtual void SetMatchBoundariesIgnoringCellOrder(int);
124  vtkGetMacro(MatchBoundariesIgnoringCellOrder, int);
126 
128 
131  virtual void SetController(vtkMultiProcessController*);
132  vtkGetObjectMacro(Controller, vtkMultiProcessController);
134 
136 
141  void SetPassThroughCellIds(int);
142  vtkGetMacro(PassThroughCellIds, int);
143  vtkBooleanMacro(PassThroughCellIds, int);
145 
147 
152  void SetPassThroughPointIds(int);
153  vtkGetMacro(PassThroughPointIds, int);
154  vtkBooleanMacro(PassThroughPointIds, int);
156 
158 
161  vtkSetMacro(GenerateProcessIds, bool);
162  vtkGetMacro(GenerateProcessIds, bool);
163  vtkBooleanMacro(GenerateProcessIds, bool);
165 
167 
173  vtkSetMacro(HideInternalAMRFaces, bool);
174  vtkGetMacro(HideInternalAMRFaces, bool);
175  vtkBooleanMacro(HideInternalAMRFaces, bool);
177 
179 
189  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
190  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
191  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
193 
194  // These keys are put in the output composite-data metadata for multipieces
195  // since this filter merges multipieces together.
196  static vtkInformationIntegerVectorKey* POINT_OFFSETS();
197  static vtkInformationIntegerVectorKey* VERTS_OFFSETS();
198  static vtkInformationIntegerVectorKey* LINES_OFFSETS();
199  static vtkInformationIntegerVectorKey* POLYS_OFFSETS();
200  static vtkInformationIntegerVectorKey* STRIPS_OFFSETS();
201 
202 protected:
204  ~vtkPVGeometryFilter() override;
205 
207 
212  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
213  vtkInformationVector* outputVector);
214  virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
215  vtkInformationVector* outputVector);
216  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
217  vtkInformationVector* outputVector) override;
219 
220  // Create a default executive.
222 
228  void ExecuteAMRBlock(vtkUniformGrid* input, vtkPolyData* output, const bool extractface[6]);
229 
233  void ExecuteAMRBlockOutline(
234  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
235 
236  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
237  int updateNumPieces, int updateGhosts, const int* wholeExtent);
238 
239  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
240  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
241 
242  void ImageDataExecute(
243  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
244 
245  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
246  int updateNumPieces, int updateGhosts, const int* wholeExtent);
247 
248  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
249  int updateNumPieces, int updateGhosts, const int* wholeExtent);
250 
251  void UnstructuredGridExecute(
252  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
253 
254  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
255 
256  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
257 
258  void ExplicitStructuredGridExecute(
259  vtkExplicitStructuredGrid* input, vtkPolyData* out, int doCommunicate, const int* wholeExtent);
260 
261  void CellGridExecute(vtkCellGrid* input, vtkPolyData* output, int doCommunicate);
262 
267  void CleanupOutputData(vtkPolyData* output, int doCommunicate);
268 
269  void ExecuteCellNormals(vtkPolyData* output, int doCommunicate);
270 
277  int MatchBoundariesIgnoringCellOrder = 0;
278 
284  vtkRecoverGeometryWireframe* RecoverWireframeFilter;
286 
291  int CheckAttributes(vtkDataObject* input);
292 
293  // Callback for recording progress of internal filters.
294  void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
295 
296  int FillInputPortInformation(int, vtkInformation*) override;
297 
298  void ReportReferences(vtkGarbageCollector*) override;
299 
305 
312 
313 private:
314  vtkPVGeometryFilter(const vtkPVGeometryFilter&) = delete;
315  void operator=(const vtkPVGeometryFilter&) = delete;
316 
317  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
319 
325  void AddBlockColors(vtkDataObject* pd, unsigned int index);
326  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
327  class BoundsReductionOperation;
329 
338  void GenerateFeatureEdgesHTG(vtkHyperTreeGrid* input, vtkPolyData* output);
339 
344  void GenerateProcessIdsArrays(vtkPolyData* output);
345 };
346 
347 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkUnstructuredGridGeometryFilter * UnstructuredGridGeometryFilter
vtkMultiProcessController * Controller
vtkGeometryFilter * GeometryFilter
virtual vtkExecutive * CreateDefaultExecutive()
static vtkDataObjectAlgorithm * New()
vtkRecoverGeometryWireframe * RecoverWireframeFilter
vtkGenericGeometryFilter * GenericGeometryFilter
vtkFeatureEdges * FeatureEdgesFilter
Geometry filter that does outlines for volumes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkOutlineSource * OutlineSource
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void ReportReferences(vtkGarbageCollector *) VTK_OVERRIDE
void operator=(const vtkObjectBase &)