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 #include "vtkParaViewDeprecation.h" // For PARAVIEW_DEPRECATED_IN_5_13_0
17 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
18 
19 #include "vtkNew.h" // for vtkNew
20 
21 class vtkCallbackCommand;
22 class vtkCellGrid;
23 class vtkDataSet;
24 class vtkDataObjectMeshCache;
25 class vtkDataObjectTree;
26 class vtkExplicitStructuredGrid;
27 class vtkFeatureEdges;
28 class vtkGenericDataSet;
30 class vtkGeometryFilter;
31 class vtkHyperTreeGrid;
32 class vtkImageData;
33 class vtkUniformGrid;
37 class vtkOutlineSource;
38 class vtkPolyData;
39 class vtkPolyDataNormals;
40 class vtkRecoverGeometryWireframe;
41 class vtkRectilinearGrid;
42 class vtkStructuredGrid;
45 class vtkAMRBox;
46 class vtkOverlappingAMR;
47 
49 {
50 public:
51  static vtkPVGeometryFilter* New();
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
60  vtkGetMacro(OutlineFlag, int);
62 
64 
67  vtkSetMacro(UseOutline, int);
68  vtkGetMacro(UseOutline, int);
70 
72 
76  void SetGenerateFeatureEdges(bool);
77  vtkGetMacro(GenerateFeatureEdges, bool);
79 
81 
84  vtkSetMacro(BlockColorsDistinctValues, int);
85  vtkGetMacro(BlockColorsDistinctValues, int);
87 
89 
94  void SetGenerateCellNormals(int);
95  vtkGetMacro(GenerateCellNormals, int);
96  vtkBooleanMacro(GenerateCellNormals, int);
98 
100 
105  void SetGeneratePointNormals(bool);
106  vtkGetMacro(GeneratePointNormals, bool);
107  vtkBooleanMacro(GeneratePointNormals, bool);
109 
111 
118  void SetFeatureAngle(double);
119  vtkGetMacro(FeatureAngle, double);
121 
123 
128  void SetSplitting(bool);
129  vtkBooleanMacro(Splitting, vtkTypeBool);
131 
133 
139  vtkSetMacro(Triangulate, int);
140  vtkGetMacro(Triangulate, int);
141  vtkBooleanMacro(Triangulate, int);
143 
145 
152  virtual void SetNonlinearSubdivisionLevel(int);
153  vtkGetMacro(NonlinearSubdivisionLevel, int);
155 
157 
163  virtual void SetMatchBoundariesIgnoringCellOrder(int);
164  vtkGetMacro(MatchBoundariesIgnoringCellOrder, int);
166 
168 
171  virtual void SetController(vtkMultiProcessController*);
172  vtkGetObjectMacro(Controller, vtkMultiProcessController);
174 
176 
181  void SetPassThroughCellIds(int);
182  vtkGetMacro(PassThroughCellIds, int);
183  vtkBooleanMacro(PassThroughCellIds, int);
185 
187 
192  void SetPassThroughPointIds(int);
193  vtkGetMacro(PassThroughPointIds, int);
194  vtkBooleanMacro(PassThroughPointIds, int);
196 
198 
201  vtkSetMacro(GenerateProcessIds, bool);
202  vtkGetMacro(GenerateProcessIds, bool);
203  vtkBooleanMacro(GenerateProcessIds, bool);
205 
207 
213  vtkSetMacro(HideInternalAMRFaces, bool);
214  vtkGetMacro(HideInternalAMRFaces, bool);
215  vtkBooleanMacro(HideInternalAMRFaces, bool);
217 
219 
229  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
230  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
231  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
233 
234  // These keys are put in the output composite-data metadata for multipieces
235  // since this filter merges multipieces together.
236  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
237  static vtkInformationIntegerVectorKey* POINT_OFFSETS();
238  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
239  static vtkInformationIntegerVectorKey* VERTS_OFFSETS();
240  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
241  static vtkInformationIntegerVectorKey* LINES_OFFSETS();
242  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
243  static vtkInformationIntegerVectorKey* POLYS_OFFSETS();
244  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
245  static vtkInformationIntegerVectorKey* STRIPS_OFFSETS();
246 
247 protected:
249  ~vtkPVGeometryFilter() override;
250 
252 
256  int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
257  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
258  vtkInformationVector* outputVector);
259  virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
260  vtkInformationVector* outputVector);
261  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
262  vtkInformationVector* outputVector) override;
264 
270  void ExecuteAMRBlock(vtkUniformGrid* input, vtkPolyData* output, const bool extractface[6]);
271 
275  void ExecuteAMRBlockOutline(
276  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
277 
278  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
279  int updateNumPieces, int updateGhosts, const int* wholeExtent);
280 
281  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
282  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
283 
284  void ImageDataExecute(
285  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
286 
287  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
288  int updateNumPieces, int updateGhosts, const int* wholeExtent);
289 
290  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
291  int updateNumPieces, int updateGhosts, const int* wholeExtent);
292 
293  void UnstructuredGridExecute(
294  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
295 
296  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
297 
298  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
299 
300  void ExplicitStructuredGridExecute(
301  vtkExplicitStructuredGrid* input, vtkPolyData* out, int doCommunicate, const int* wholeExtent);
302 
303  void CellGridExecute(vtkCellGrid* input, vtkPolyData* output, int doCommunicate);
304 
306 
310  PARAVIEW_DEPRECATED_IN_5_13_0("Use CleanupOutputData(vtkPolyData* output) instead.")
311  void CleanupOutputData(vtkPolyData* output, int vtkNotUsed(doCommunicate))
312  {
313  this->CleanupOutputData(output);
314  }
315  void CleanupOutputData(vtkPolyData* output);
317 
318  PARAVIEW_DEPRECATED_IN_5_13_0("Use ExecuteNormalsComputation instead.")
319  void ExecuteCellNormals(vtkPolyData* output, int doCommunicate);
320 
326  bool Splitting;
327  double FeatureAngle;
330  int MatchBoundariesIgnoringCellOrder = 0;
331 
340 
345  int CheckAttributes(vtkDataObject* input);
346 
347  // Callback for recording progress of internal filters.
348  void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
349 
350  int FillInputPortInformation(int, vtkInformation*) override;
351 
352  void ReportReferences(vtkGarbageCollector*) override;
353 
360 
361 private:
362  vtkPVGeometryFilter(const vtkPVGeometryFilter&) = delete;
363  void operator=(const vtkPVGeometryFilter&) = delete;
364 
365  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
367 
373  void AddBlockColors(vtkDataObject* pd, unsigned int index);
374  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
375  class BoundsReductionOperation;
377 
386  void GenerateFeatureEdgesHTG(vtkHyperTreeGrid* input, vtkPolyData* output);
387 
391  void ExecuteNormalsComputation(vtkPolyData* output);
392 
397  void GenerateProcessIdsArrays(vtkPolyData* output);
398 
403  bool UseCacheIfPossible(vtkDataObject* input, vtkDataObject* output);
404 
408  void UpdateCache(vtkDataObject* output);
409 
411 };
412 
413 #endif
vtkMultiProcessController * Controller
static vtkDataObjectAlgorithm * New()
vtkSmartPointer< vtkRecoverGeometryWireframe > RecoverWireframeFilter
Geometry filter that does outlines for volumes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
int vtkTypeBool
vtkSmartPointer< vtkPolyDataNormals > PolyDataNormals
#define PARAVIEW_DEPRECATED_IN_5_13_0(reason)
vtkSmartPointer< vtkUnstructuredGridGeometryFilter > UnstructuredGridGeometryFilter
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
vtkSmartPointer< vtkGenericGeometryFilter > GenericGeometryFilter
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkSmartPointer< vtkFeatureEdges > FeatureEdgesFilter
void ReportReferences(vtkGarbageCollector *) VTK_OVERRIDE
#define const
Definition: zconf.h:238
void operator=(const vtkObjectBase &)
vtkSmartPointer< vtkOutlineSource > OutlineSource
vtkSmartPointer< vtkGeometryFilter > GeometryFilter