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=========================================================================*/
162#ifndef vtkGeometryFilter_h
163#define vtkGeometryFilter_h
164
165#include "vtkFiltersGeometryModule.h" // For export macro
166#include "vtkPolyDataAlgorithm.h"
167
174
175// Used to coordinate delegation to vtkDataSetSurfaceFilter
176struct VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilterHelper
177{
178 unsigned char IsLinear;
182};
183
184class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
185{
186public:
188
193 void PrintSelf(ostream& os, vtkIndent indent) override;
195
197
200 vtkSetMacro(PointClipping, bool);
201 vtkGetMacro(PointClipping, bool);
202 vtkBooleanMacro(PointClipping, bool);
204
206
209 vtkSetMacro(CellClipping, bool);
210 vtkGetMacro(CellClipping, bool);
211 vtkBooleanMacro(CellClipping, bool);
213
215
218 vtkSetMacro(ExtentClipping, bool);
219 vtkGetMacro(ExtentClipping, bool);
220 vtkBooleanMacro(ExtentClipping, bool);
222
224
227 vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
228 vtkGetMacro(PointMinimum, vtkIdType);
230
232
235 vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
236 vtkGetMacro(PointMaximum, vtkIdType);
238
240
243 vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
244 vtkGetMacro(CellMinimum, vtkIdType);
246
248
251 vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
252 vtkGetMacro(CellMaximum, vtkIdType);
254
258 void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
259
261
264 void SetExtent(double extent[6]);
265 double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
267
269
277 vtkSetMacro(Merging, bool);
278 vtkGetMacro(Merging, bool);
279 vtkBooleanMacro(Merging, bool);
281
283
290 void SetOutputPointsPrecision(int precision);
293
295
302 vtkSetMacro(FastMode, bool);
303 vtkGetMacro(FastMode, bool);
304 vtkBooleanMacro(FastMode, bool);
306
308
315 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
316 virtual void SetDegree(unsigned int vtkNotUsed(arg)) {}
317 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
318 virtual unsigned int GetDegreeMinValue() { return 1; }
319 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
320 virtual unsigned int GetDegreeMaxValue() { return static_cast<int>(~0u >> 1); }
321 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
322 virtual unsigned int GetDegree() { return 4; }
324
326
331 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
332 void SetLocator(vtkIncrementalPointLocator* locator);
333 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
334 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
336
341 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
342 void CreateDefaultLocator();
343
344 // The following are methods compatible with vtkDataSetSurfaceFilter.
345
347
352 vtkSetMacro(PieceInvariant, int);
353 vtkGetMacro(PieceInvariant, int);
355
357
365 vtkSetMacro(PassThroughCellIds, vtkTypeBool);
366 vtkGetMacro(PassThroughCellIds, vtkTypeBool);
367 vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
368 vtkSetMacro(PassThroughPointIds, vtkTypeBool);
369 vtkGetMacro(PassThroughPointIds, vtkTypeBool);
370 vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
372
374
380 vtkSetStringMacro(OriginalCellIdsName);
381 virtual const char* GetOriginalCellIdsName()
382 {
383 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
384 }
385 vtkSetStringMacro(OriginalPointIdsName);
386 virtual const char* GetOriginalPointIdsName()
387 {
388 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
389 }
391
393
408
410
421 vtkSetMacro(NonlinearSubdivisionLevel, int);
422 vtkGetMacro(NonlinearSubdivisionLevel, int);
424
426
429 vtkSetMacro(Delegation, vtkTypeBool);
430 vtkGetMacro(Delegation, vtkTypeBool);
431 vtkBooleanMacro(Delegation, vtkTypeBool);
433
435
445 vtkSetMacro(RemoveGhostInterfaces, bool);
446 vtkBooleanMacro(RemoveGhostInterfaces, bool);
447 vtkGetMacro(RemoveGhostInterfaces, bool);
449
451
458
461 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
462
464 vtkPolyData* exc, bool* extractFace = nullptr);
465 virtual int StructuredExecute(
466 vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, bool* extractFace = nullptr);
467
469 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
471
472protected:
475
478
479 // special cases for performance
481
486 double Extent[6];
492
495
497
498 // These methods support compatibility with vtkDataSetSurfaceFilter
502
505
507
509
510private:
511 vtkGeometryFilter(const vtkGeometryFilter&) = delete;
512 void operator=(const vtkGeometryFilter&) = delete;
513};
514
515#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:172
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:119
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:200
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(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(...)