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 vtkCellGrid;
22 class vtkDataSet;
23 class vtkDataObjectMeshCache;
24 class vtkDataObjectTree;
25 class vtkExplicitStructuredGrid;
26 class vtkFeatureEdges;
27 class vtkGenericDataSet;
29 class vtkGeometryFilter;
30 class vtkHyperTreeGrid;
31 class vtkImageData;
32 class vtkUniformGrid;
36 class vtkOutlineSource;
37 class vtkPolyData;
38 class vtkPolyDataNormals;
39 class vtkRecoverGeometryWireframe;
40 class vtkRectilinearGrid;
41 class vtkStructuredGrid;
44 
46 {
47 public:
48  static vtkPVGeometryFilter* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
57  vtkGetMacro(OutlineFlag, int);
59 
61 
64  vtkSetMacro(UseOutline, int);
65  vtkGetMacro(UseOutline, int);
67 
69 
73  void SetGenerateFeatureEdges(bool);
74  vtkGetMacro(GenerateFeatureEdges, bool);
76 
78 
81  vtkSetMacro(BlockColorsDistinctValues, int);
82  vtkGetMacro(BlockColorsDistinctValues, int);
84 
86 
91  void SetGenerateCellNormals(int);
92  vtkGetMacro(GenerateCellNormals, int);
93  vtkBooleanMacro(GenerateCellNormals, int);
95 
97 
102  void SetGeneratePointNormals(bool);
103  vtkGetMacro(GeneratePointNormals, bool);
104  vtkBooleanMacro(GeneratePointNormals, bool);
106 
108 
115  void SetFeatureAngle(double);
116  vtkGetMacro(FeatureAngle, double);
118 
120 
125  void SetSplitting(bool);
126  vtkBooleanMacro(Splitting, vtkTypeBool);
128 
130 
136  vtkSetMacro(Triangulate, int);
137  vtkGetMacro(Triangulate, int);
138  vtkBooleanMacro(Triangulate, int);
140 
142 
149  virtual void SetNonlinearSubdivisionLevel(int);
150  vtkGetMacro(NonlinearSubdivisionLevel, int);
152 
154 
160  virtual void SetMatchBoundariesIgnoringCellOrder(int);
161  vtkGetMacro(MatchBoundariesIgnoringCellOrder, int);
163 
165 
168  virtual void SetController(vtkMultiProcessController*);
169  vtkGetObjectMacro(Controller, vtkMultiProcessController);
171 
173 
178  void SetPassThroughCellIds(int);
179  vtkGetMacro(PassThroughCellIds, int);
180  vtkBooleanMacro(PassThroughCellIds, int);
182 
184 
189  void SetPassThroughPointIds(int);
190  vtkGetMacro(PassThroughPointIds, int);
191  vtkBooleanMacro(PassThroughPointIds, int);
193 
195 
198  vtkSetMacro(GenerateProcessIds, bool);
199  vtkGetMacro(GenerateProcessIds, bool);
200  vtkBooleanMacro(GenerateProcessIds, bool);
202 
204 
210  vtkSetMacro(HideInternalAMRFaces, bool);
211  vtkGetMacro(HideInternalAMRFaces, bool);
212  vtkBooleanMacro(HideInternalAMRFaces, bool);
214 
216 
226  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
227  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
228  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
230 
231  // These keys are put in the output composite-data metadata for multipieces
232  // since this filter merges multipieces together.
233  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
234  static vtkInformationIntegerVectorKey* POINT_OFFSETS();
235  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
236  static vtkInformationIntegerVectorKey* VERTS_OFFSETS();
237  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
238  static vtkInformationIntegerVectorKey* LINES_OFFSETS();
239  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
240  static vtkInformationIntegerVectorKey* POLYS_OFFSETS();
241  PARAVIEW_DEPRECATED_IN_5_13_0("They are not used anymore.")
242  static vtkInformationIntegerVectorKey* STRIPS_OFFSETS();
243 
244 protected:
246  ~vtkPVGeometryFilter() override;
247 
249 
253  int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
254  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
255  vtkInformationVector* outputVector);
256  virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
257  vtkInformationVector* outputVector);
258  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
259  vtkInformationVector* outputVector) override;
261 
267  void ExecuteAMRBlock(vtkUniformGrid* input, vtkPolyData* output, const bool extractface[6]);
268 
272  void ExecuteAMRBlockOutline(
273  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
274 
275  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
276  int updateNumPieces, int updateGhosts, const int* wholeExtent);
277 
278  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
279  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
280 
281  void ImageDataExecute(
282  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
283 
284  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
285  int updateNumPieces, int updateGhosts, const int* wholeExtent);
286 
287  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
288  int updateNumPieces, int updateGhosts, const int* wholeExtent);
289 
290  void UnstructuredGridExecute(
291  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
292 
293  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
294 
295  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
296 
297  void ExplicitStructuredGridExecute(
298  vtkExplicitStructuredGrid* input, vtkPolyData* out, int doCommunicate, const int* wholeExtent);
299 
300  void CellGridExecute(vtkCellGrid* input, vtkPolyData* output, int doCommunicate);
301 
303 
307  PARAVIEW_DEPRECATED_IN_5_13_0("Use CleanupOutputData(vtkPolyData* output) instead.")
308  void CleanupOutputData(vtkPolyData* output, int vtkNotUsed(doCommunicate))
309  {
310  this->CleanupOutputData(output);
311  }
312  void CleanupOutputData(vtkPolyData* output);
314 
315  PARAVIEW_DEPRECATED_IN_5_13_0("Use ExecuteNormalsComputation instead.")
316  void ExecuteCellNormals(vtkPolyData* output, int doCommunicate);
317 
323  bool Splitting;
324  double FeatureAngle;
327  int MatchBoundariesIgnoringCellOrder = 0;
328 
337 
342  int CheckAttributes(vtkDataObject* input);
343 
344  // Callback for recording progress of internal filters.
345  void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
346 
347  int FillInputPortInformation(int, vtkInformation*) override;
348 
349  void ReportReferences(vtkGarbageCollector*) override;
350 
357 
358 private:
359  vtkPVGeometryFilter(const vtkPVGeometryFilter&) = delete;
360  void operator=(const vtkPVGeometryFilter&) = delete;
361 
362  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
364 
370  void AddBlockColors(vtkDataObject* pd, unsigned int index);
371  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
372  class BoundsReductionOperation;
374 
383  void GenerateFeatureEdgesHTG(vtkHyperTreeGrid* input, vtkPolyData* output);
384 
388  void ExecuteNormalsComputation(vtkPolyData* output);
389 
394  void GenerateProcessIdsArrays(vtkPolyData* output);
395 
400  bool UseCacheIfPossible(vtkDataObject* input, vtkDataObject* output);
401 
405  void UpdateCache(vtkDataObject* output);
406 
415  vtkSmartPointer<vtkDataObjectTree> GetDataObjectTreeInput(vtkInformationVector** inputVector);
416 
418 };
419 
420 #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