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=========================================================================*/
102#ifndef vtkGeometryFilter_h
103#define vtkGeometryFilter_h
104
105#include "vtkFiltersGeometryModule.h" // For export macro
106#include "vtkPolyDataAlgorithm.h"
107
114
115// Used to coordinate delegation to vtkDataSetSurfaceFilter
116struct VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilterHelper
117{
118 unsigned char IsLinear;
122};
123
124class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
125{
126public:
128
133 void PrintSelf(ostream& os, vtkIndent indent) override;
135
137
140 vtkSetMacro(PointClipping, bool);
141 vtkGetMacro(PointClipping, bool);
142 vtkBooleanMacro(PointClipping, bool);
144
146
149 vtkSetMacro(CellClipping, bool);
150 vtkGetMacro(CellClipping, bool);
151 vtkBooleanMacro(CellClipping, bool);
153
155
158 vtkSetMacro(ExtentClipping, bool);
159 vtkGetMacro(ExtentClipping, bool);
160 vtkBooleanMacro(ExtentClipping, bool);
162
164
167 vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
168 vtkGetMacro(PointMinimum, vtkIdType);
170
172
175 vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
176 vtkGetMacro(PointMaximum, vtkIdType);
178
180
183 vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
184 vtkGetMacro(CellMinimum, vtkIdType);
186
188
191 vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
192 vtkGetMacro(CellMaximum, vtkIdType);
194
198 void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
199
201
204 void SetExtent(double extent[6]);
205 double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
207
209
217 vtkSetMacro(Merging, bool);
218 vtkGetMacro(Merging, bool);
219 vtkBooleanMacro(Merging, bool);
221
223
230 void SetOutputPointsPrecision(int precision);
233
235
242 vtkSetMacro(FastMode, bool);
243 vtkGetMacro(FastMode, bool);
244 vtkBooleanMacro(FastMode, bool);
246
248
255 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
256 virtual void SetDegree(unsigned int vtkNotUsed(arg)) {}
257 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
258 virtual unsigned int GetDegreeMinValue() { return 1; }
259 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
260 virtual unsigned int GetDegreeMaxValue() { return static_cast<int>(~0u >> 1); }
261 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
262 virtual unsigned int GetDegree() { return 4; }
264
266
271 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
272 void SetLocator(vtkIncrementalPointLocator* locator);
273 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
274 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
276
281 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
282 void CreateDefaultLocator();
283
284 // The following are methods compatible with vtkDataSetSurfaceFilter.
285
287
292 vtkSetMacro(PieceInvariant, int);
293 vtkGetMacro(PieceInvariant, int);
295
297
305 vtkSetMacro(PassThroughCellIds, vtkTypeBool);
306 vtkGetMacro(PassThroughCellIds, vtkTypeBool);
307 vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
308 vtkSetMacro(PassThroughPointIds, vtkTypeBool);
309 vtkGetMacro(PassThroughPointIds, vtkTypeBool);
310 vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
312
314
320 vtkSetStringMacro(OriginalCellIdsName);
321 virtual const char* GetOriginalCellIdsName()
322 {
323 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
324 }
325 vtkSetStringMacro(OriginalPointIdsName);
326 virtual const char* GetOriginalPointIdsName()
327 {
328 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
329 }
331
333
348
350
361 vtkSetMacro(NonlinearSubdivisionLevel, int);
362 vtkGetMacro(NonlinearSubdivisionLevel, int);
364
366
369 vtkSetMacro(Delegation, vtkTypeBool);
370 vtkGetMacro(Delegation, vtkTypeBool);
371 vtkBooleanMacro(Delegation, vtkTypeBool);
373
375
385 vtkSetMacro(RemoveGhostInterfaces, bool);
386 vtkBooleanMacro(RemoveGhostInterfaces, bool);
387 vtkGetMacro(RemoveGhostInterfaces, bool);
389
391
398
400 vtkDataSet* input, vtkPolyData* output, vtkGeometryFilterHelper* info, vtkPolyData* exc);
401 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
402
404 vtkPolyData* exc, bool* extractFace = nullptr);
405 virtual int StructuredExecute(
406 vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, bool* extractFace = nullptr);
407
409 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
411
412protected:
415
417 int FillInputPortInformation(int port, vtkInformation* info) override;
418
419 // special cases for performance
421
426 double Extent[6];
432
435
437
438 // These methods support compatibility with vtkDataSetSurfaceFilter
442
445
447
449
450private:
451 vtkGeometryFilter(const vtkGeometryFilter&) = delete;
452 void operator=(const vtkGeometryFilter&) = delete;
453};
454
455#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:72
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:49
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
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(...)