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_6_2_0
17 #include "vtkSmartPointer.h" // needed for vtkSmartPointer
18 
19 #include "vtkNew.h" // for vtkNew
20 
21 class vtkCartesianGrid;
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;
36 class vtkOutlineSource;
37 class vtkPolyData;
38 class vtkPolyDataNormals;
39 class vtkRecoverGeometryWireframe;
40 class vtkRectilinearGrid;
41 class vtkStructuredGrid;
44 
45 class PARAVIEW_DEPRECATED_IN_6_2_0("Use vtkGeometryFilterDispatcher instead")
47 {
48 public:
49  static vtkPVGeometryFilter* New();
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
58  vtkGetMacro(OutlineFlag, int);
60 
62 
65  vtkSetMacro(UseOutline, int);
66  vtkGetMacro(UseOutline, int);
68 
70 
74  void SetGenerateFeatureEdges(bool);
75  vtkGetMacro(GenerateFeatureEdges, bool);
77 
79 
82  vtkSetMacro(BlockColorsDistinctValues, int);
83  vtkGetMacro(BlockColorsDistinctValues, int);
85 
87 
92  void SetGenerateCellNormals(int);
93  vtkGetMacro(GenerateCellNormals, int);
94  vtkBooleanMacro(GenerateCellNormals, int);
96 
98 
103  void SetGeneratePointNormals(bool);
104  vtkGetMacro(GeneratePointNormals, bool);
105  vtkBooleanMacro(GeneratePointNormals, bool);
107 
109 
116  void SetFeatureAngle(double);
117  vtkGetMacro(FeatureAngle, double);
119 
121 
126  void SetSplitting(bool);
127  vtkBooleanMacro(Splitting, vtkTypeBool);
129 
131 
137  vtkSetMacro(Triangulate, int);
138  vtkGetMacro(Triangulate, int);
139  vtkBooleanMacro(Triangulate, int);
141 
143 
150  virtual void SetNonlinearSubdivisionLevel(int);
151  vtkGetMacro(NonlinearSubdivisionLevel, int);
153 
155 
161  virtual void SetMatchBoundariesIgnoringCellOrder(int);
162  vtkGetMacro(MatchBoundariesIgnoringCellOrder, int);
164 
166 
169  virtual void SetController(vtkMultiProcessController*);
170  vtkGetObjectMacro(Controller, vtkMultiProcessController);
172 
174 
179  void SetPassThroughCellIds(int);
180  vtkGetMacro(PassThroughCellIds, int);
181  vtkBooleanMacro(PassThroughCellIds, int);
183 
185 
190  void SetPassThroughPointIds(int);
191  vtkGetMacro(PassThroughPointIds, int);
192  vtkBooleanMacro(PassThroughPointIds, int);
194 
196 
199  vtkSetMacro(GenerateProcessIds, bool);
200  vtkGetMacro(GenerateProcessIds, bool);
201  vtkBooleanMacro(GenerateProcessIds, bool);
203 
205 
211  vtkSetMacro(HideInternalAMRFaces, bool);
212  vtkGetMacro(HideInternalAMRFaces, bool);
213  vtkBooleanMacro(HideInternalAMRFaces, bool);
215 
217 
227  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
228  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
229  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
231 
232 protected:
234  ~vtkPVGeometryFilter() override;
235 
237 
242  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
243  vtkInformationVector* outputVector);
244  virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
245  vtkInformationVector* outputVector);
246  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
247  vtkInformationVector* outputVector) override;
249 
255  void ExecuteAMRBlock(vtkCartesianGrid* input, vtkPolyData* output, const bool extractface[6]);
256 
260  void ExecuteAMRBlockOutline(
261  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
262 
263  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
264  int updateNumPieces, int updateGhosts, const int* wholeExtent);
265 
266  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
267  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
268 
269  void ImageDataExecute(
270  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
271 
272  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
273  int updateNumPieces, int updateGhosts, const int* wholeExtent);
274 
275  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
276  int updateNumPieces, int updateGhosts, const int* wholeExtent);
277 
278  void UnstructuredGridExecute(
279  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
280 
281  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
282 
283  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
284 
285  void ExplicitStructuredGridExecute(
286  vtkExplicitStructuredGrid* input, vtkPolyData* out, int doCommunicate, const int* wholeExtent);
287 
288  void CellGridExecute(vtkCellGrid* input, vtkPolyData* output, int doCommunicate);
289 
291 
295  void CleanupOutputData(vtkPolyData* output);
297 
303  bool Splitting;
304  double FeatureAngle;
307  int MatchBoundariesIgnoringCellOrder = 0;
308 
317 
322  int CheckAttributes(vtkDataObject* input);
323 
324  // Callback for recording progress of internal filters.
325  void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
326 
327  int FillInputPortInformation(int, vtkInformation*) override;
328 
329  void ReportReferences(vtkGarbageCollector*) override;
330 
337 
338 private:
339  vtkPVGeometryFilter(const vtkPVGeometryFilter&) = delete;
340  void operator=(const vtkPVGeometryFilter&) = delete;
341 
347  void AddDataObjectTreeArrays(vtkDataObjectTree* realInput, vtkDataObjectTree* output);
348 
352  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
353 
355 
361  void AddBlockColors(vtkDataObject* pd, unsigned int index);
362  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
363  class BoundsReductionOperation;
365 
374  void GenerateFeatureEdgesHTG(vtkHyperTreeGrid* input, vtkPolyData* output);
375 
379  void ExecuteNormalsComputation(vtkPolyData* output);
380 
385  void GenerateProcessIdsArrays(vtkPolyData* output);
386 
391  bool UseCacheIfPossible(vtkDataObject* input, vtkDataObject* output);
392 
396  void UpdateCache(vtkDataObject* output);
397 
406  vtkSmartPointer<vtkDataObjectTree> GetDataObjectTreeInput(vtkInformationVector** inputVector);
407 
409 };
410 
411 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
#define PARAVIEW_DEPRECATED_IN_6_2_0(reason)
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
vtkSmartPointer< vtkUnstructuredGridGeometryFilter > UnstructuredGridGeometryFilter
#define VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT
vtkSmartPointer< vtkGenericGeometryFilter > GenericGeometryFilter
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkSmartPointer< vtkFeatureEdges > FeatureEdgesFilter
void ReportReferences(vtkGarbageCollector *) VTK_OVERRIDE
void operator=(const vtkObjectBase &)
vtkSmartPointer< vtkOutlineSource > OutlineSource
vtkSmartPointer< vtkGeometryFilter > GeometryFilter