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_11_0
17 
18 class vtkCallbackCommand;
19 class vtkCellGrid;
20 class vtkDataSet;
21 class vtkExplicitStructuredGrid;
22 class vtkFeatureEdges;
23 class vtkGenericDataSet;
25 class vtkGeometryFilter;
26 class vtkHyperTreeGrid;
27 class vtkImageData;
28 class vtkUniformGrid;
32 class vtkOutlineSource;
33 class vtkPolyData;
34 class vtkRecoverGeometryWireframe;
35 class vtkRectilinearGrid;
36 class vtkStructuredGrid;
39 class vtkAMRBox;
40 class vtkOverlappingAMR;
41 
42 class VTKPVVTKEXTENSIONSFILTERSRENDERING_EXPORT vtkPVGeometryFilter : public vtkDataObjectAlgorithm
43 {
44 public:
45  static vtkPVGeometryFilter* New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
54  vtkGetMacro(OutlineFlag, int);
56 
58 
61  vtkSetMacro(UseOutline, int);
62  vtkGetMacro(UseOutline, int);
64 
66 
70  vtkSetMacro(GenerateFeatureEdges, bool);
71  vtkGetMacro(GenerateFeatureEdges, bool);
73 
75 
78  vtkSetMacro(BlockColorsDistinctValues, int);
79  vtkGetMacro(BlockColorsDistinctValues, int);
81 
83 
89  "Removed; the backing implementation has done nothing since VTK 9.1.0")
90  void SetUseStrips(int) {}
92  "Removed; the backing implementation has done nothing since VTK 9.1.0")
93  virtual int GetUseStrips() VTK_FUTURE_CONST { return false; }
95  "Removed; the backing implementation has done nothing since VTK 9.1.0")
96  virtual void UseStripsOn() {}
98  "Removed; the backing implementation has done nothing since VTK 9.1.0")
99  virtual void UseStripsOff() {}
100 
101  // Description:
102  // Makes set use strips call modified after it changes the setting.
104  "Removed; the backing implementation has done nothing since VTK 9.1.0")
105  void SetForceUseStrips(int) {}
107  "Removed; the backing implementation has done nothing since VTK 9.1.0")
108  virtual int GetForceUseStrips() VTK_FUTURE_CONST { return false; }
110  "Removed; the backing implementation has done nothing since VTK 9.1.0")
111  virtual void ForceUseStripsOn() {}
113  "Removed; the backing implementation has done nothing since VTK 9.1.0")
114  virtual void ForceUseStripsOff() {}
116 
118 
123  vtkSetMacro(GenerateCellNormals, int);
124  vtkGetMacro(GenerateCellNormals, int);
125  vtkBooleanMacro(GenerateCellNormals, int);
127 
129 
135  vtkSetMacro(Triangulate, int);
136  vtkGetMacro(Triangulate, int);
137  vtkBooleanMacro(Triangulate, int);
139 
141 
148  virtual void SetNonlinearSubdivisionLevel(int);
149  vtkGetMacro(NonlinearSubdivisionLevel, int);
151 
153 
159  virtual void SetMatchBoundariesIgnoringCellOrder(int);
160  vtkGetMacro(MatchBoundariesIgnoringCellOrder, int);
162 
164 
167  virtual void SetController(vtkMultiProcessController*);
168  vtkGetObjectMacro(Controller, vtkMultiProcessController);
170 
172 
177  void SetPassThroughCellIds(int);
178  vtkGetMacro(PassThroughCellIds, int);
179  vtkBooleanMacro(PassThroughCellIds, int);
181 
183 
188  void SetPassThroughPointIds(int);
189  vtkGetMacro(PassThroughPointIds, int);
190  vtkBooleanMacro(PassThroughPointIds, int);
192 
194 
197  vtkSetMacro(GenerateProcessIds, bool);
198  vtkGetMacro(GenerateProcessIds, bool);
199  vtkBooleanMacro(GenerateProcessIds, bool);
201 
203 
209  vtkSetMacro(HideInternalAMRFaces, bool);
210  vtkGetMacro(HideInternalAMRFaces, bool);
211  vtkBooleanMacro(HideInternalAMRFaces, bool);
213 
215 
225  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
226  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
227  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
229 
230  // These keys are put in the output composite-data metadata for multipieces
231  // since this filter merges multipieces together.
232  static vtkInformationIntegerVectorKey* POINT_OFFSETS();
233  static vtkInformationIntegerVectorKey* VERTS_OFFSETS();
234  static vtkInformationIntegerVectorKey* LINES_OFFSETS();
235  static vtkInformationIntegerVectorKey* POLYS_OFFSETS();
236  static vtkInformationIntegerVectorKey* STRIPS_OFFSETS();
237 
238 protected:
240  ~vtkPVGeometryFilter() override;
241 
243 
248  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
249  vtkInformationVector* outputVector);
250  virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
251  vtkInformationVector* outputVector);
252  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
253  vtkInformationVector* outputVector) override;
255 
256  // Create a default executive.
258 
264  void ExecuteAMRBlock(vtkUniformGrid* input, vtkPolyData* output, const bool extractface[6]);
265 
269  void ExecuteAMRBlockOutline(
270  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
271 
272  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
273  int updateNumPieces, int updateGhosts, const int* wholeExtent);
274 
275  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
276  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
277 
278  void ImageDataExecute(
279  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
280 
281  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
282  int updateNumPieces, int updateGhosts, const int* wholeExtent);
283 
284  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
285  int updateNumPieces, int updateGhosts, const int* wholeExtent);
286 
287  void UnstructuredGridExecute(
288  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
289 
290  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
291 
292  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
293 
294  void ExplicitStructuredGridExecute(
295  vtkExplicitStructuredGrid* input, vtkPolyData* out, int doCommunicate, const int* wholeExtent);
296 
297  void CellGridExecute(vtkCellGrid* input, vtkPolyData* output, int doCommunicate);
298 
303  void CleanupOutputData(vtkPolyData* output, int doCommunicate);
304 
305  void ExecuteCellNormals(vtkPolyData* output, int doCommunicate);
306 
313  int MatchBoundariesIgnoringCellOrder = 0;
314 
320  vtkRecoverGeometryWireframe* RecoverWireframeFilter;
322 
327  int CheckAttributes(vtkDataObject* input);
328 
329  // Callback for recording progress of internal filters.
330  void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
331 
332  int FillInputPortInformation(int, vtkInformation*) override;
333 
334  void ReportReferences(vtkGarbageCollector*) override;
335 
341 
348 
349 private:
350  vtkPVGeometryFilter(const vtkPVGeometryFilter&) = delete;
351  void operator=(const vtkPVGeometryFilter&) = delete;
352 
353  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
355 
361  void AddBlockColors(vtkDataObject* pd, unsigned int index);
362  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
363  class BoundsReductionOperation;
365 };
366 
367 #endif
vtkAMRBox
vtkAlgorithm::CreateDefaultExecutive
virtual vtkExecutive * CreateDefaultExecutive()
vtkPVGeometryFilter::GenerateCellNormals
int GenerateCellNormals
Definition: vtkPVGeometryFilter.h:310
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkPVGeometryFilter::RecoverWireframeFilter
vtkRecoverGeometryWireframe * RecoverWireframeFilter
Definition: vtkPVGeometryFilter.h:320
vtkPVGeometryFilter::GenericGeometryFilter
vtkGenericGeometryFilter * GenericGeometryFilter
Definition: vtkPVGeometryFilter.h:318
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") virtual void ForceUseStripsOn()
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:109
vtkPVGeometryFilter::PassThroughCellIds
int PassThroughCellIds
Definition: vtkPVGeometryFilter.h:343
vtkPVGeometryFilter
Geometry filter that does outlines for volumes.
Definition: vtkPVGeometryFilter.h:42
vtkOutlineSource
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") virtual void ForceUseStripsOff()
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:112
vtkPVGeometryFilter::GeometryFilter
vtkGeometryFilter * GeometryFilter
Definition: vtkPVGeometryFilter.h:317
vtkGeometryFilter
vtkPVGeometryFilter::HideInternalAMRFaces
bool HideInternalAMRFaces
Definition: vtkPVGeometryFilter.h:345
vtkRectilinearGrid
vtkInformationVector
vtkDataObjectAlgorithm
vtkPVGeometryFilter::GenerateFeatureEdges
bool GenerateFeatureEdges
Definition: vtkPVGeometryFilter.h:347
vtkUnstructuredGridBase
vtkUniformGrid
vtkStructuredGrid
vtkObject
vtkPVGeometryFilter::NonlinearSubdivisionLevel
int NonlinearSubdivisionLevel
Definition: vtkPVGeometryFilter.h:312
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") virtual int GetUseStrips() VTK_FUTURE_CONST
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:91
vtkPVGeometryFilter::PassThroughPointIds
int PassThroughPointIds
Definition: vtkPVGeometryFilter.h:344
vtkPVGeometryFilter::OutlineSource
vtkOutlineSource * OutlineSource
Definition: vtkPVGeometryFilter.h:316
vtkDataObjectAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkGenericDataSet
vtkDataObjectAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkPVGeometryFilter::FeatureEdgesFilter
vtkFeatureEdges * FeatureEdgesFilter
Definition: vtkPVGeometryFilter.h:321
vtkPVGeometryFilter::BlockColorsDistinctValues
int BlockColorsDistinctValues
Definition: vtkPVGeometryFilter.h:309
vtkExecutive
vtkPVGeometryFilter::OutlineFlag
int OutlineFlag
Definition: vtkPVGeometryFilter.h:307
vtkDataObjectAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") void SetUseStrips(int)
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:88
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") virtual int GetForceUseStrips() VTK_FUTURE_CONST
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:106
vtkMultiProcessController
vtkPVGeometryFilter::UseOutline
int UseOutline
Definition: vtkPVGeometryFilter.h:308
vtkImageData
vtkIndent
vtkFeatureEdges
vtkUnstructuredGridGeometryFilter
vtkParaViewDeprecation.h
vtkOverlappingAMR
vtkGarbageCollector
vtkAlgorithm::ReportReferences
void ReportReferences(vtkGarbageCollector *) VTK_OVERRIDE
vtkGenericGeometryFilter
vtkDataSet
vtkInformation
vtkPVGeometryFilter::Controller
vtkMultiProcessController * Controller
Definition: vtkPVGeometryFilter.h:315
vtkPVGeometryFilter::GenerateProcessIds
bool GenerateProcessIds
Definition: vtkPVGeometryFilter.h:342
vtkPolyData
vtkCallbackCommand
vtkDataObjectAlgorithm::New
static vtkDataObjectAlgorithm * New()
vtkPVGeometryFilter::Triangulate
int Triangulate
Definition: vtkPVGeometryFilter.h:311
vtkDataObjectAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDataObjectAlgorithm.h
vtkPVGeometryFilter::UseNonOverlappingAMRMetaDataForOutlines
bool UseNonOverlappingAMRMetaDataForOutlines
Definition: vtkPVGeometryFilter.h:346
vtkInformationIntegerVectorKey
vtkDataObjectAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPVGeometryFilter::UnstructuredGridGeometryFilter
vtkUnstructuredGridGeometryFilter * UnstructuredGridGeometryFilter
Definition: vtkPVGeometryFilter.h:319
vtkDataObject
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") void SetForceUseStrips(int)
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:103
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") virtual void UseStripsOn()
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:94
vtkPVGeometryFilter::PARAVIEW_DEPRECATED_IN_5_11_0
PARAVIEW_DEPRECATED_IN_5_11_0("Removed; the backing implementation has done nothing since VTK 9.1.0") virtual void UseStripsOff()
When input is structured data, this flag will generate faces with triangle strips.
Definition: vtkPVGeometryFilter.h:97
vtkHyperTreeGrid