ParaView
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 "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
28 class vtkCallbackCommand;
29 class vtkDataSet;
30 class vtkDataSetSurfaceFilter;
31 class vtkGenericDataSet;
32 class vtkGenericGeometryFilter;
33 class vtkHyperOctree;
34 class vtkHyperTreeGrid;
35 class vtkImageData;
36 class vtkUniformGrid;
37 class vtkInformationIntegerVectorKey;
38 class vtkInformationVector;
39 class vtkMultiProcessController;
40 class vtkOutlineSource;
41 class vtkPolyData;
43 class vtkRectilinearGrid;
44 class vtkStructuredGrid;
45 class vtkUnstructuredGridBase;
46 class vtkUnstructuredGridGeometryFilter;
47 class vtkAMRBox;
48 class vtkOverlappingAMR;
49 
50 class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkPVGeometryFilter : public vtkDataObjectAlgorithm
51 {
52 public:
53  static vtkPVGeometryFilter* New();
54  vtkTypeMacro(vtkPVGeometryFilter, vtkDataObjectAlgorithm);
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
62  vtkGetMacro(OutlineFlag, int);
64 
66 
69  vtkSetMacro(UseOutline, int);
70  vtkGetMacro(UseOutline, int);
72 
74 
77  vtkSetMacro(BlockColorsDistinctValues, int);
78  vtkGetMacro(BlockColorsDistinctValues, int);
80 
82 
87  void SetUseStrips(int);
88  vtkGetMacro(UseStrips, int);
89  vtkBooleanMacro(UseStrips, int);
91 
92  // Desctiption:
93  // Makes set use strips call modified after it changes the setting.
94  void SetForceUseStrips(int);
95  vtkGetMacro(ForceUseStrips, int);
96  vtkBooleanMacro(ForceUseStrips, int);
97 
99 
104  vtkSetMacro(GenerateCellNormals, int);
105  vtkGetMacro(GenerateCellNormals, int);
106  vtkBooleanMacro(GenerateCellNormals, int);
108 
110 
116  virtual void SetTriangulate(int val);
117  vtkGetMacro(Triangulate, int);
118  vtkBooleanMacro(Triangulate, int);
120 
122 
129  virtual void SetNonlinearSubdivisionLevel(int);
130  vtkGetMacro(NonlinearSubdivisionLevel, int);
132 
134 
137  virtual void SetController(vtkMultiProcessController*);
138  vtkGetObjectMacro(Controller, vtkMultiProcessController);
140 
142 
147  void SetPassThroughCellIds(int);
148  vtkGetMacro(PassThroughCellIds, int);
149  vtkBooleanMacro(PassThroughCellIds, int);
151 
153 
158  void SetPassThroughPointIds(int);
159  vtkGetMacro(PassThroughPointIds, int);
160  vtkBooleanMacro(PassThroughPointIds, int);
162 
164 
167  vtkSetMacro(GenerateProcessIds, bool);
168  vtkGetMacro(GenerateProcessIds, bool);
169  vtkBooleanMacro(GenerateProcessIds, bool);
171 
173 
179  vtkSetMacro(HideInternalAMRFaces, bool);
180  vtkGetMacro(HideInternalAMRFaces, bool);
181  vtkBooleanMacro(HideInternalAMRFaces, bool);
183 
185 
195  vtkSetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
196  vtkGetMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
197  vtkBooleanMacro(UseNonOverlappingAMRMetaDataForOutlines, bool);
199 
200  // These keys are put in the output composite-data metadata for multipieces
201  // since this filter merges multipieces together.
202  static vtkInformationIntegerVectorKey* POINT_OFFSETS();
203  static vtkInformationIntegerVectorKey* VERTS_OFFSETS();
204  static vtkInformationIntegerVectorKey* LINES_OFFSETS();
205  static vtkInformationIntegerVectorKey* POLYS_OFFSETS();
206  static vtkInformationIntegerVectorKey* STRIPS_OFFSETS();
207 
208 protected:
211 
213 
217  virtual int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
218  virtual int RequestAMRData(vtkInformation* request, vtkInformationVector** inputVector,
219  vtkInformationVector* outputVector);
220  virtual int RequestCompositeData(vtkInformation* request, vtkInformationVector** inputVector,
221  vtkInformationVector* outputVector);
222  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
223  vtkInformationVector* outputVector);
225 
226  // Create a default executive.
227  virtual vtkExecutive* CreateDefaultExecutive();
228 
234  void ExecuteAMRBlock(vtkUniformGrid* input, vtkPolyData* output, const bool extractface[6]);
235 
239  void ExecuteAMRBlockOutline(
240  const double bounds[6], vtkPolyData* output, const bool extractface[6]);
241 
242  void ExecuteBlock(vtkDataObject* input, vtkPolyData* output, int doCommunicate, int updatePiece,
243  int updateNumPieces, int updateGhosts, const int* wholeExtent);
244 
245  void DataSetExecute(vtkDataSet* input, vtkPolyData* output, int doCommunicate);
246  void GenericDataSetExecute(vtkGenericDataSet* input, vtkPolyData* output, int doCommunicate);
247 
248  void ImageDataExecute(
249  vtkImageData* input, vtkPolyData* output, int doCommunicate, int updatePiece, const int* ext);
250 
251  void StructuredGridExecute(vtkStructuredGrid* input, vtkPolyData* output, int updatePiece,
252  int updateNumPieces, int updateGhosts, const int* wholeExtent);
253 
254  void RectilinearGridExecute(vtkRectilinearGrid* input, vtkPolyData* output, int updatePiece,
255  int updateNumPieces, int updateGhosts, const int* wholeExtent);
256 
257  void UnstructuredGridExecute(
258  vtkUnstructuredGridBase* input, vtkPolyData* output, int doCommunicate);
259 
260  void PolyDataExecute(vtkPolyData* input, vtkPolyData* output, int doCommunicate);
261 
262  void OctreeExecute(vtkHyperOctree* input, vtkPolyData* output, int doCommunicate);
263 
264  void HyperTreeGridExecute(vtkHyperTreeGrid* input, vtkPolyData* output, int doCommunicate);
265 
270  void CleanupOutputData(vtkPolyData* output, int doCommunicate);
271 
272  void ExecuteCellNormals(vtkPolyData* output, int doCommunicate);
273 
274  void ChangeUseStripsInternal(int val, int force);
275 
283 
284  vtkMultiProcessController* Controller;
285  vtkOutlineSource* OutlineSource;
286  vtkDataSetSurfaceFilter* DataSetSurfaceFilter;
287  vtkGenericGeometryFilter* GenericGeometryFilter;
288  vtkUnstructuredGridGeometryFilter* UnstructuredGridGeometryFilter;
290 
295  int CheckAttributes(vtkDataObject* input);
296 
297  // Callback registered with the InternalProgressObserver.
298  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
299  void InternalProgressCallback(vtkAlgorithm* algorithm);
300  // The observer to report progress from the internal readers.
301  vtkCallbackCommand* InternalProgressObserver;
302 
303  virtual int FillInputPortInformation(int, vtkInformation*);
304 
305  virtual void ReportReferences(vtkGarbageCollector*);
306 
311  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
312 
313  // Convenience method to purge ghost cells.
314  void RemoveGhostCells(vtkPolyData*);
315 
320  vtkTimeStamp StripSettingMTime;
322 
325 
326 private:
327  vtkPVGeometryFilter(const vtkPVGeometryFilter&) VTK_DELETE_FUNCTION;
328  void operator=(const vtkPVGeometryFilter&) VTK_DELETE_FUNCTION;
329 
330  void AddCompositeIndex(vtkPolyData* pd, unsigned int index);
332 
338  void AddBlockColors(vtkPolyData* pd, unsigned int index);
339  void AddHierarchicalIndex(vtkPolyData* pd, unsigned int level, unsigned int index);
340  class BoundsReductionOperation;
342 };
343 
344 #endif
vtkUnstructuredGridGeometryFilter * UnstructuredGridGeometryFilter
Get corrected wireframe from tesselated facets.
vtkMultiProcessController * Controller
vtkTimeStamp StripSettingMTime
vtkCallbackCommand * InternalProgressObserver
vtkGenericGeometryFilter * GenericGeometryFilter
vtkDataSetSurfaceFilter * DataSetSurfaceFilter
Geometry filter that does outlines for volumes.
vtkPVRecoverGeometryWireframe * RecoverWireframeFilter
vtkOutlineSource * OutlineSource