VTK  9.2.6
vtkGeometryFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeometryFilter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
93 #ifndef vtkGeometryFilter_h
94 #define vtkGeometryFilter_h
95 
96 #include "vtkFiltersGeometryModule.h" // For export macro
97 #include "vtkPolyDataAlgorithm.h"
98 
100 class vtkStructuredGrid;
102 class vtkGeometryFilter;
105 
106 // Used to coordinate delegation to vtkDataSetSurfaceFilter
107 struct VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilterHelper
108 {
109  unsigned char IsLinear;
110  static vtkGeometryFilterHelper* CharacterizeUnstructuredGrid(vtkUnstructuredGridBase*);
111  static void CopyFilterParams(vtkGeometryFilter* gf, vtkDataSetSurfaceFilter* dssf);
112  static void CopyFilterParams(vtkDataSetSurfaceFilter* dssf, vtkGeometryFilter* gf);
113 };
114 
115 class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
116 {
117 public:
119 
122  static vtkGeometryFilter* New();
124  void PrintSelf(ostream& os, vtkIndent indent) override;
126 
128 
131  vtkSetMacro(PointClipping, bool);
132  vtkGetMacro(PointClipping, bool);
133  vtkBooleanMacro(PointClipping, bool);
135 
137 
140  vtkSetMacro(CellClipping, bool);
141  vtkGetMacro(CellClipping, bool);
142  vtkBooleanMacro(CellClipping, bool);
144 
146 
149  vtkSetMacro(ExtentClipping, bool);
150  vtkGetMacro(ExtentClipping, bool);
151  vtkBooleanMacro(ExtentClipping, bool);
153 
155 
158  vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
159  vtkGetMacro(PointMinimum, vtkIdType);
161 
163 
166  vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
167  vtkGetMacro(PointMaximum, vtkIdType);
169 
171 
174  vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
175  vtkGetMacro(CellMinimum, vtkIdType);
177 
179 
182  vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
183  vtkGetMacro(CellMaximum, vtkIdType);
185 
189  void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
190 
192 
195  void SetExtent(double extent[6]);
196  double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
198 
200 
208  vtkSetMacro(Merging, bool);
209  vtkGetMacro(Merging, bool);
210  vtkBooleanMacro(Merging, bool);
212 
214 
221  void SetOutputPointsPrecision(int precision);
222  int GetOutputPointsPrecision() const;
224 
226 
233  vtkSetMacro(FastMode, bool);
234  vtkGetMacro(FastMode, bool);
235  vtkBooleanMacro(FastMode, bool);
237 
239 
246  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
247  virtual void SetDegree(unsigned int vtkNotUsed(arg)) {}
248  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
249  virtual unsigned int GetDegreeMinValue() { return 1; }
250  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
251  virtual unsigned int GetDegreeMaxValue() { return static_cast<int>(~0u >> 1); }
252  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
253  virtual unsigned int GetDegree() { return 4; }
255 
257 
262  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
263  void SetLocator(vtkIncrementalPointLocator* locator);
264  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
265  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
267 
272  VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
273  void CreateDefaultLocator();
274 
275  // The following are methods compatible with vtkDataSetSurfaceFilter.
276 
278 
283  vtkSetMacro(PieceInvariant, int);
284  vtkGetMacro(PieceInvariant, int);
286 
288 
296  vtkSetMacro(PassThroughCellIds, vtkTypeBool);
297  vtkGetMacro(PassThroughCellIds, vtkTypeBool);
298  vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
299  vtkSetMacro(PassThroughPointIds, vtkTypeBool);
300  vtkGetMacro(PassThroughPointIds, vtkTypeBool);
301  vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
303 
305 
311  vtkSetStringMacro(OriginalCellIdsName);
312  virtual const char* GetOriginalCellIdsName()
313  {
314  return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
315  }
316  vtkSetStringMacro(OriginalPointIdsName);
317  virtual const char* GetOriginalPointIdsName()
318  {
319  return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
320  }
322 
324 
335  void SetExcludedFacesData(vtkPolyData*);
336  void SetExcludedFacesConnection(vtkAlgorithmOutput* algOutput);
337  vtkPolyData* GetExcludedFaces();
339 
341 
352  vtkSetMacro(NonlinearSubdivisionLevel, int);
353  vtkGetMacro(NonlinearSubdivisionLevel, int);
355 
357 
360  vtkSetMacro(Delegation, vtkTypeBool);
361  vtkGetMacro(Delegation, vtkTypeBool);
362  vtkBooleanMacro(Delegation, vtkTypeBool);
364 
366 
376  vtkSetMacro(RemoveGhostInterfaces, bool);
377  vtkBooleanMacro(RemoveGhostInterfaces, bool);
378  vtkGetMacro(RemoveGhostInterfaces, bool);
380 
382 
387  int PolyDataExecute(vtkDataSet* input, vtkPolyData* output, vtkPolyData* exc);
388  virtual int PolyDataExecute(vtkDataSet*, vtkPolyData*);
389 
390  int UnstructuredGridExecute(
392  virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
393 
394  int StructuredExecute(vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo,
395  vtkPolyData* exc, bool* extractFace = nullptr);
396  virtual int StructuredExecute(
397  vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, bool* extractFace = nullptr);
398 
399  int DataSetExecute(vtkDataSet* input, vtkPolyData* output, vtkPolyData* exc);
400  virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
402 
403 protected:
405  ~vtkGeometryFilter() override;
406 
408  int FillInputPortInformation(int port, vtkInformation* info) override;
409 
410  // special cases for performance
412 
417  double Extent[6];
423 
424  bool Merging;
426 
427  bool FastMode;
428 
429  // These methods support compatibility with vtkDataSetSurfaceFilter
433 
436 
438 
440 
441 private:
442  vtkGeometryFilter(const vtkGeometryFilter&) = delete;
443  void operator=(const vtkGeometryFilter&) = delete;
444 };
445 
446 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_DEPRECATED_IN_9_2_0(reason)
Abstract class in support of both point location and point insertion.
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
vtkTypeBool PassThroughPointIds
Proxy object to connect input/output ports.
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_SIZEHINT(...)
virtual const char * GetOriginalPointIdsName()
If PassThroughCellIds or PassThroughPointIds is on, then these ivars control the name given to the fi...
vtkTypeBool PassThroughCellIds
topologically regular array of data
#define VTK_ID_MAX
Definition: vtkType.h:336
double * GetExtent()
Set / get a (xmin,xmax, ymin,ymax, zmin,zmax) bounding box to clip data.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
extract boundary geometry from dataset (or convert data to polygonal type)
Extracts outer surface (as vtkPolyData) of any dataset.
dataset represents arbitrary combinations of all possible cell types.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIncrementalPointLocator * Locator