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=========================================================================*/
165#ifndef vtkGeometryFilter_h
166#define vtkGeometryFilter_h
167
168#include "vtkFiltersGeometryModule.h" // For export macro
169#include "vtkPolyDataAlgorithm.h"
170
177struct vtkExcludedFaces;
178
179// Used to coordinate delegation to vtkDataSetSurfaceFilter
180struct VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilterHelper
181{
182 unsigned char IsLinear;
186};
187
188class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
189{
190public:
192
197 void PrintSelf(ostream& os, vtkIndent indent) override;
199
201
204 vtkSetMacro(PointClipping, bool);
205 vtkGetMacro(PointClipping, bool);
206 vtkBooleanMacro(PointClipping, bool);
208
210
213 vtkSetMacro(CellClipping, bool);
214 vtkGetMacro(CellClipping, bool);
215 vtkBooleanMacro(CellClipping, bool);
217
219
222 vtkSetMacro(ExtentClipping, bool);
223 vtkGetMacro(ExtentClipping, bool);
224 vtkBooleanMacro(ExtentClipping, bool);
226
228
231 vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
232 vtkGetMacro(PointMinimum, vtkIdType);
234
236
239 vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
240 vtkGetMacro(PointMaximum, vtkIdType);
242
244
247 vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
248 vtkGetMacro(CellMinimum, vtkIdType);
250
252
255 vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
256 vtkGetMacro(CellMaximum, vtkIdType);
258
262 void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
263
265
268 void SetExtent(double extent[6]);
269 double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
271
273
281 vtkSetMacro(Merging, bool);
282 vtkGetMacro(Merging, bool);
283 vtkBooleanMacro(Merging, bool);
285
287
294 void SetOutputPointsPrecision(int precision);
297
299
305 vtkSetMacro(FastMode, bool);
306 vtkGetMacro(FastMode, bool);
307 vtkBooleanMacro(FastMode, bool);
309
311
318 vtkSetClampMacro(Degree, unsigned int, 1, VTK_INT_MAX);
319 vtkGetMacro(Degree, unsigned int);
321
323
329 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
331
337
338 // The following are methods compatible with vtkDataSetSurfaceFilter.
339
341
346 vtkSetMacro(PieceInvariant, int);
347 vtkGetMacro(PieceInvariant, int);
349
351
359 vtkSetMacro(PassThroughCellIds, vtkTypeBool);
360 vtkGetMacro(PassThroughCellIds, vtkTypeBool);
361 vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
362 vtkSetMacro(PassThroughPointIds, vtkTypeBool);
363 vtkGetMacro(PassThroughPointIds, vtkTypeBool);
364 vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
366
368
374 vtkSetStringMacro(OriginalCellIdsName);
375 virtual const char* GetOriginalCellIdsName()
376 {
377 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
378 }
379 vtkSetStringMacro(OriginalPointIdsName);
380 virtual const char* GetOriginalPointIdsName()
381 {
382 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
383 }
385
387
402
404
415 vtkSetMacro(NonlinearSubdivisionLevel, int);
416 vtkGetMacro(NonlinearSubdivisionLevel, int);
418
420
423 vtkSetMacro(Delegation, vtkTypeBool);
424 vtkGetMacro(Delegation, vtkTypeBool);
425 vtkBooleanMacro(Delegation, vtkTypeBool);
427
429
434 int PolyDataExecute(vtkDataSet* input, vtkPolyData* output, vtkExcludedFaces* exc);
436
438 vtkDataSet* input, vtkPolyData* output, vtkGeometryFilterHelper* info, vtkExcludedFaces* exc);
439 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
440
442 vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, vtkExcludedFaces* exc);
443 virtual int StructuredExecute(vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo);
444
445 int DataSetExecute(vtkDataSet* input, vtkPolyData* output, vtkExcludedFaces* exc);
446 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
448
449protected:
452
454 int FillInputPortInformation(int port, vtkInformation* info) override;
455
456 // special cases for performance
458
463 double Extent[6];
468
471
473 unsigned int Degree;
474
475 // This methods support compatability with vtkDataSetSurfaceFilter
479
482
484
486
487private:
488 vtkGeometryFilter(const vtkGeometryFilter&) = delete;
489 void operator=(const vtkGeometryFilter&) = delete;
490};
491
492#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:166
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:113
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:195
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types
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(...)