vtkPVGeometryFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVGeometryFilter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
23 #ifndef vtkPVGeometryFilter_h
24 #define vtkPVGeometryFilter_h
25 
26 #include "vtkDataObjectAlgorithm.h"
27 #include "vtkPVVTKExtensionsFiltersRenderingModule.h" // needed for export macro
28 class vtkCallbackCommand;
29 class vtkDataSet;
31 class vtkExplicitStructuredGrid;
32 class vtkFeatureEdges;
33 class vtkGenericDataSet;
35 class vtkHyperTreeGrid;
36 class vtkImageData;
37 class vtkUniformGrid;
41 class vtkOutlineSource;
42 class vtkPolyData;
44 class vtkRectilinearGrid;
45 class vtkStructuredGrid;
48 class vtkAMRBox;
49 class vtkOverlappingAMR;
50 
52 {
53 public:
54  static vtkPVGeometryFilter* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
63  vtkGetMacro(OutlineFlag, int);
65 
67 
70  vtkSetMacro(UseOutline, int);
71  vtkGetMacro(UseOutline, int);
73 
75 
79  vtkSetMacro(GenerateFeatureEdges, bool);
80  vtkGetMacro(GenerateFeatureEdges, bool);
82 
84 
87  vtkSetMacro(BlockColorsDistinctValues, int);
88  vtkGetMacro(BlockColorsDistinctValues, int);
90 
92 
97  void SetUseStrips(int);
98  vtkGetMacro(UseStrips, int);
99  vtkBooleanMacro(UseStrips, int);
101 
102  // Description:
103  // Makes set use strips call modified after it changes the setting.
104  void SetForceUseStrips(int);
105  vtkGetMacro(ForceUseStrips, int);
106  vtkBooleanMacro(ForceUseStrips, int);
107 
109 
114  vtkSetMacro(GenerateCellNormals, int);
115  vtkGetMacro(GenerateCellNormals, int);
116  vtkBooleanMacro(GenerateCellNormals, int);
118 
120 
126  virtual void SetTriangulate(int val);
127  vtkGetMacro(Triangulate, int);
128  vtkBooleanMacro(Triangulate, int);
130 
132 
139  virtual void SetNonlinearSubdivisionLevel(int);
140  vtkGetMacro(NonlinearSubdivisionLevel, int);
142 
144 
147  virtual void SetController(vtkMultiProcessController*);
148  vtkGetObjectMacro(Controller, vtkMultiProcessController);
150 
152 
157  void SetPassThroughCellIds(int);
158  vtkGetMacro(PassThroughCellIds, int);
159  vtkBooleanMacro(PassThroughCellIds, int);
161 
163 
168  void SetPassThroughPointIds(int);
169  vtkGetMacro(PassThroughPointIds, int);
170  vtkBooleanMacro(PassThroughPointIds, int);
172 
174 
177  vtkSetMacro(GenerateProcessIds, bool);
178  vtkGetMacro(GenerateProcessIds, bool);
179  vtkBooleanMacro(GenerateProcessIds, bool);
181 
183 
189  vtkSetMacro(HideInternalAMRFaces, bool);
190  vtkGetMacro(HideInternalAMRFaces, bool);
191  vtkBooleanMacro(HideInternalAMRFaces, bool);
193 
195 
205  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
206  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
207  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
209 
210  // These keys are put in the output composite-data metadata for multipieces
211  // since this filter merges multipieces together.
212  static vtkInformationIntegerVectorKey* POINT_OFFSETS();
213  static vtkInformationIntegerVectorKey* VERTS_OFFSETS();
214  static vtkInformationIntegerVectorKey* LINES_OFFSETS();
215  static vtkInformationIntegerVectorKey* POLYS_OFFSETS();
216  static vtkInformationIntegerVectorKey* STRIPS_OFFSETS();
217 
218 protected:
220  ~vtkPVGeometryFilter() override;
221 
223 
228  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
229  vtkInformationVector* outputVector);
230  virtual int RequestDataObjectTree(vtkInformation* request, vtkInformationVector** inputVector,
231  vtkInformationVector* outputVector);
232  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
233  vtkInformationVector* outputVector) override;
235 
236  // Create a default executive.
238 
244  void ExecuteAMRBlock(vtkUniformGrid* input, vtkPolyData* output, const bool extractface[6]);
245 
249  void ExecuteAMRBlockOutline(
250  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
251 
252  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
253  int updateNumPieces, int updateGhosts, const int* wholeExtent);
254 
255  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
256  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
257 
258  void ImageDataExecute(
259  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
260 
261  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
262  int updateNumPieces, int updateGhosts, const int* wholeExtent);
263 
264  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
265  int updateNumPieces, int updateGhosts, const int* wholeExtent);
266 
267  void UnstructuredGridExecute(
268  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
269 
270  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
271 
272  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
273 
274  void ExplicitStructuredGridExecute(
275  vtkExplicitStructuredGrid* input, vtkPolyData* out, int doCommunicate, const int* wholeExtent);
276 
281  void CleanupOutputData(vtkPolyData* output, int doCommunicate);
282 
283  void ExecuteCellNormals(vtkPolyData* output, int doCommunicate);
284 
285  void ChangeUseStripsInternal(int val, int force);
286 
294 
302 
307  int CheckAttributes(vtkDataObject* input);
308 
309  // Callback for recording progress of internal filters.
310  void HandleGeometryFilterProgress(vtkObject* caller, unsigned long, void*);
311 
312  int FillInputPortInformation(int, vtkInformation*) override;
313 
314  void ReportReferences(vtkGarbageCollector*) override;
315 
321 
322  // Convenience method to purge ghost cells.
323  void RemoveGhostCells(vtkPolyData*);
324 
334 
335 private:
336  vtkPVGeometryFilter(const vtkPVGeometryFilter&) = delete;
337  void operator=(const vtkPVGeometryFilter&) = delete;
338 
339  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
341 
347  void AddBlockColors(vtkDataObject* pd, unsigned int index);
348  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
349  class BoundsReductionOperation;
351 };
352 
353 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkUnstructuredGridGeometryFilter * UnstructuredGridGeometryFilter
Get corrected wireframe from tessellated facets.
vtkMultiProcessController * Controller
vtkTimeStamp StripSettingMTime
virtual vtkExecutive * CreateDefaultExecutive()
static vtkDataObjectAlgorithm * New()
vtkGenericGeometryFilter * GenericGeometryFilter
vtkDataSetSurfaceFilter * DataSetSurfaceFilter
vtkFeatureEdges * FeatureEdgesFilter
Geometry filter that does outlines for volumes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkPVRecoverGeometryWireframe * RecoverWireframeFilter
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 &)