VTK  9.1.0
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=========================================================================*/
105#ifndef vtkGeometryFilter_h
106#define vtkGeometryFilter_h
107
108#include "vtkFiltersGeometryModule.h" // For export macro
109#include "vtkPolyDataAlgorithm.h"
110
117struct vtkExcludedFaces;
118
119// Used to coordinate delegation to vtkDataSetSurfaceFilter
120struct VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilterHelper
121{
122 unsigned char IsLinear;
126};
127
128class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
129{
130public:
132
137 void PrintSelf(ostream& os, vtkIndent indent) override;
139
141
144 vtkSetMacro(PointClipping, bool);
145 vtkGetMacro(PointClipping, bool);
146 vtkBooleanMacro(PointClipping, bool);
148
150
153 vtkSetMacro(CellClipping, bool);
154 vtkGetMacro(CellClipping, bool);
155 vtkBooleanMacro(CellClipping, bool);
157
159
162 vtkSetMacro(ExtentClipping, bool);
163 vtkGetMacro(ExtentClipping, bool);
164 vtkBooleanMacro(ExtentClipping, bool);
166
168
171 vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
172 vtkGetMacro(PointMinimum, vtkIdType);
174
176
179 vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
180 vtkGetMacro(PointMaximum, vtkIdType);
182
184
187 vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
188 vtkGetMacro(CellMinimum, vtkIdType);
190
192
195 vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
196 vtkGetMacro(CellMaximum, vtkIdType);
198
202 void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
203
205
208 void SetExtent(double extent[6]);
209 double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
211
213
221 vtkSetMacro(Merging, bool);
222 vtkGetMacro(Merging, bool);
223 vtkBooleanMacro(Merging, bool);
225
227
234 void SetOutputPointsPrecision(int precision);
237
239
245 vtkSetMacro(FastMode, bool);
246 vtkGetMacro(FastMode, bool);
247 vtkBooleanMacro(FastMode, bool);
249
251
258 vtkSetClampMacro(Degree, unsigned int, 1, VTK_INT_MAX);
259 vtkGetMacro(Degree, unsigned int);
261
263
269 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
271
277
278 // The following are methods compatible with vtkDataSetSurfaceFilter.
279
281
286 vtkSetMacro(PieceInvariant, int);
287 vtkGetMacro(PieceInvariant, int);
289
291
299 vtkSetMacro(PassThroughCellIds, vtkTypeBool);
300 vtkGetMacro(PassThroughCellIds, vtkTypeBool);
301 vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
302 vtkSetMacro(PassThroughPointIds, vtkTypeBool);
303 vtkGetMacro(PassThroughPointIds, vtkTypeBool);
304 vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
306
308
314 vtkSetStringMacro(OriginalCellIdsName);
315 virtual const char* GetOriginalCellIdsName()
316 {
317 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
318 }
319 vtkSetStringMacro(OriginalPointIdsName);
320 virtual const char* GetOriginalPointIdsName()
321 {
322 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
323 }
325
327
342
344
355 vtkSetMacro(NonlinearSubdivisionLevel, int);
356 vtkGetMacro(NonlinearSubdivisionLevel, int);
358
360
363 vtkSetMacro(Delegation, vtkTypeBool);
364 vtkGetMacro(Delegation, vtkTypeBool);
365 vtkBooleanMacro(Delegation, vtkTypeBool);
367
369
374 int PolyDataExecute(vtkDataSet* input, vtkPolyData* output, vtkExcludedFaces* exc);
376
378 vtkDataSet* input, vtkPolyData* output, vtkGeometryFilterHelper* info, vtkExcludedFaces* exc);
379 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
380
382 vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, vtkExcludedFaces* exc);
383 virtual int StructuredExecute(vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo);
384
385 int DataSetExecute(vtkDataSet* input, vtkPolyData* output, vtkExcludedFaces* exc);
386 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
388
389protected:
392
395
396 // special cases for performance
398
403 double Extent[6];
408
411
413 unsigned int Degree;
414
415 // This methods support compatability with vtkDataSetSurfaceFilter
419
422
424
426
427private:
428 vtkGeometryFilter(const vtkGeometryFilter&) = delete;
429 void operator=(const vtkGeometryFilter&) = delete;
430};
431
432#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:66
extract boundary geometry from dataset (or convert data to polygonal type)
int PolyDataExecute(vtkDataSet *input, vtkPolyData *output, vtkExcludedFaces *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
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
void CreateDefaultLocator()
Create default locator.
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....
virtual const char * GetOriginalCellIdsName()
If PassThroughCellIds or PassThroughPointIds is on, then these ivars control the name given to the fi...
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.
vtkTypeBool PassThroughPointIds
int GetOutputPointsPrecision() const
Set/get the desired precision for the output types.
int DataSetExecute(vtkDataSet *input, vtkPolyData *output, vtkExcludedFaces *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
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.
void SetLocator(vtkIncrementalPointLocator *locator)
Set / get a spatial locator for merging points.
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....
int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output, vtkGeometryFilterHelper *info, vtkExcludedFaces *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
int StructuredExecute(vtkDataSet *input, vtkPolyData *output, vtkInformation *inInfo, vtkExcludedFaces *exc)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
~vtkGeometryFilter() override
virtual int StructuredExecute(vtkDataSet *input, vtkPolyData *output, vtkInformation *inInfo)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
void SetExcludedFacesConnection(vtkAlgorithmOutput *algOutput)
If a second, vtkPolyData input is provided, this second input specifies a list of faces to be exclude...
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:43
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:95
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
@ extent
Definition: vtkX3D.h:351
static vtkGeometryFilterHelper * CharacterizeUnstructuredGrid(vtkUnstructuredGrid *)
static void CopyFilterParams(vtkDataSetSurfaceFilter *dssf, vtkGeometryFilter *gf)
static void CopyFilterParams(vtkGeometryFilter *gf, vtkDataSetSurfaceFilter *dssf)
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
#define VTK_ID_MAX
Definition: vtkType.h:336
#define VTK_INT_MAX
Definition: vtkType.h:155
#define VTK_SIZEHINT(...)