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=========================================================================*/
87#ifndef vtkGeometryFilter_h
88#define vtkGeometryFilter_h
89
90#include "vtkFiltersGeometryModule.h" // For export macro
92
99
100// Used to coordinate delegation to vtkDataSetSurfaceFilter
101struct VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilterHelper
102{
103 unsigned char IsLinear;
107};
108
109class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
110{
111public:
113
118 void PrintSelf(ostream& os, vtkIndent indent) override;
120
122
125 vtkSetMacro(PointClipping, bool);
126 vtkGetMacro(PointClipping, bool);
127 vtkBooleanMacro(PointClipping, bool);
129
131
134 vtkSetMacro(CellClipping, bool);
135 vtkGetMacro(CellClipping, bool);
136 vtkBooleanMacro(CellClipping, bool);
138
140
143 vtkSetMacro(ExtentClipping, bool);
144 vtkGetMacro(ExtentClipping, bool);
145 vtkBooleanMacro(ExtentClipping, bool);
147
149
152 vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
153 vtkGetMacro(PointMinimum, vtkIdType);
155
157
160 vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
161 vtkGetMacro(PointMaximum, vtkIdType);
163
165
168 vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
169 vtkGetMacro(CellMinimum, vtkIdType);
171
173
176 vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
177 vtkGetMacro(CellMaximum, vtkIdType);
179
183 void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
184
186
189 void SetExtent(double extent[6]);
190 double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
192
194
202 vtkSetMacro(Merging, bool);
203 vtkGetMacro(Merging, bool);
204 vtkBooleanMacro(Merging, bool);
206
208
215 void SetOutputPointsPrecision(int precision);
218
220
227 vtkSetMacro(FastMode, bool);
228 vtkGetMacro(FastMode, bool);
229 vtkBooleanMacro(FastMode, bool);
231
233
240 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
241 virtual void SetDegree(unsigned int vtkNotUsed(arg)) {}
242 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
243 virtual unsigned int GetDegreeMinValue() { return 1; }
244 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
245 virtual unsigned int GetDegreeMaxValue() { return static_cast<int>(~0u >> 1); }
246 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
247 virtual unsigned int GetDegree() { return 4; }
249
251
256 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
257 void SetLocator(vtkIncrementalPointLocator* locator);
258 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
259 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
261
266 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
267 void CreateDefaultLocator();
268
269 // The following are methods compatible with vtkDataSetSurfaceFilter.
270
272
277 vtkSetMacro(PieceInvariant, int);
278 vtkGetMacro(PieceInvariant, int);
280
282
290 vtkSetMacro(PassThroughCellIds, vtkTypeBool);
291 vtkGetMacro(PassThroughCellIds, vtkTypeBool);
292 vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
293 vtkSetMacro(PassThroughPointIds, vtkTypeBool);
294 vtkGetMacro(PassThroughPointIds, vtkTypeBool);
295 vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
297
299
305 vtkSetStringMacro(OriginalCellIdsName);
306 virtual const char* GetOriginalCellIdsName()
307 {
308 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
309 }
310 vtkSetStringMacro(OriginalPointIdsName);
311 virtual const char* GetOriginalPointIdsName()
312 {
313 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
314 }
316
318
333
335
346 vtkSetMacro(NonlinearSubdivisionLevel, int);
347 vtkGetMacro(NonlinearSubdivisionLevel, int);
349
351
354 vtkSetMacro(Delegation, vtkTypeBool);
355 vtkGetMacro(Delegation, vtkTypeBool);
356 vtkBooleanMacro(Delegation, vtkTypeBool);
358
360
370 vtkSetMacro(RemoveGhostInterfaces, bool);
371 vtkBooleanMacro(RemoveGhostInterfaces, bool);
372 vtkGetMacro(RemoveGhostInterfaces, bool);
374
376
383
385 vtkDataSet* input, vtkPolyData* output, vtkGeometryFilterHelper* info, vtkPolyData* exc);
386 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
387
389 vtkPolyData* exc, bool* extractFace = nullptr);
390 virtual int StructuredExecute(
391 vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, bool* extractFace = nullptr);
392
394 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
396
397protected:
400
402 int FillInputPortInformation(int port, vtkInformation* info) override;
403
404 // special cases for performance
406
411 double Extent[6];
417
420
422
423 // These methods support compatibility with vtkDataSetSurfaceFilter
427
430
432
434
435private:
436 vtkGeometryFilter(const vtkGeometryFilter&) = delete;
437 void operator=(const vtkGeometryFilter&) = delete;
438};
439
440#endif
Proxy object to connect input/output ports.
Extracts outer surface (as vtkPolyData) of any dataset.
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
extract boundary geometry from dataset (or convert data to polygonal type)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual const char * GetOriginalPointIdsName()
If PassThroughCellIds or PassThroughPointIds is on, then these ivars control the name given to the fi...
vtkTypeBool PassThroughCellIds
virtual int PolyDataExecute(vtkDataSet *, vtkPolyData *)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
vtkIncrementalPointLocator * Locator
vtkPolyData * GetExcludedFaces()
If a second, vtkPolyData input is provided, this second input specifies a list of faces to be exclude...
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int StructuredExecute(vtkDataSet *input, vtkPolyData *output, vtkInformation *inInfo, vtkPolyData *exc, bool *extractFace=nullptr)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
vtkTypeBool PassThroughPointIds
int GetOutputPointsPrecision() const
Set/get the desired precision for the output types.
void SetOutputPointsPrecision(int precision)
Set/get the desired precision for the output types.
static vtkGeometryFilter * New()
Standard methods for instantiation, type information, and printing.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
virtual int StructuredExecute(vtkDataSet *input, vtkPolyData *output, vtkInformation *inInfo, bool *extractFace=nullptr)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output, vtkGeometryFilterHelper *info, vtkPolyData *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
virtual int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
~vtkGeometryFilter() override
void SetExcludedFacesConnection(vtkAlgorithmOutput *algOutput)
If a second, vtkPolyData input is provided, this second input specifies a list of faces to be exclude...
int PolyDataExecute(vtkDataSet *input, vtkPolyData *output, vtkPolyData *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
int DataSetExecute(vtkDataSet *input, vtkPolyData *output, vtkPolyData *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
void SetExtent(double extent[6])
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.
void SetExcludedFacesData(vtkPolyData *)
If a second, vtkPolyData input is provided, this second input specifies a list of faces to be exclude...
void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
Specify a (xmin,xmax, ymin,ymax, zmin,zmax) bounding box to clip data.
double * GetExtent()
Set / get a (xmin,xmax, ymin,ymax, zmin,zmax) bounding box to clip data.
virtual int DataSetExecute(vtkDataSet *input, vtkPolyData *output)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types.
static vtkGeometryFilterHelper * CharacterizeUnstructuredGrid(vtkUnstructuredGridBase *)
static void CopyFilterParams(vtkDataSetSurfaceFilter *dssf, vtkGeometryFilter *gf)
static void CopyFilterParams(vtkGeometryFilter *gf, vtkDataSetSurfaceFilter *dssf)
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)
int vtkIdType
Definition vtkType.h:332
#define VTK_ID_MAX
Definition vtkType.h:336
#define VTK_SIZEHINT(...)