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=========================================================================*/
93#ifndef vtkGeometryFilter_h
94#define vtkGeometryFilter_h
95
96#include "vtkFiltersGeometryModule.h" // For export macro
98
105
106// Used to coordinate delegation to vtkDataSetSurfaceFilter
114
115class VTKFILTERSGEOMETRY_EXPORT vtkGeometryFilter : public vtkPolyDataAlgorithm
116{
117public:
119
124 void PrintSelf(ostream& os, vtkIndent indent) override;
126
128
131 vtkSetMacro(PointClipping, bool);
132 vtkGetMacro(PointClipping, bool);
133 vtkBooleanMacro(PointClipping, bool);
135
137
140 vtkSetMacro(CellClipping, bool);
141 vtkGetMacro(CellClipping, bool);
142 vtkBooleanMacro(CellClipping, bool);
144
146
149 vtkSetMacro(ExtentClipping, bool);
150 vtkGetMacro(ExtentClipping, bool);
151 vtkBooleanMacro(ExtentClipping, bool);
153
155
158 vtkSetClampMacro(PointMinimum, vtkIdType, 0, VTK_ID_MAX);
159 vtkGetMacro(PointMinimum, vtkIdType);
161
163
166 vtkSetClampMacro(PointMaximum, vtkIdType, 0, VTK_ID_MAX);
167 vtkGetMacro(PointMaximum, vtkIdType);
169
171
174 vtkSetClampMacro(CellMinimum, vtkIdType, 0, VTK_ID_MAX);
175 vtkGetMacro(CellMinimum, vtkIdType);
177
179
182 vtkSetClampMacro(CellMaximum, vtkIdType, 0, VTK_ID_MAX);
183 vtkGetMacro(CellMaximum, vtkIdType);
185
189 void SetExtent(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax);
190
192
195 void SetExtent(double extent[6]);
196 double* GetExtent() VTK_SIZEHINT(6) { return this->Extent; }
198
200
208 vtkSetMacro(Merging, bool);
209 vtkGetMacro(Merging, bool);
210 vtkBooleanMacro(Merging, bool);
212
214
221 void SetOutputPointsPrecision(int precision);
224
226
233 vtkSetMacro(FastMode, bool);
234 vtkGetMacro(FastMode, bool);
235 vtkBooleanMacro(FastMode, bool);
237
239
246 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
247 virtual void SetDegree(unsigned int vtkNotUsed(arg)) {}
248 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
249 virtual unsigned int GetDegreeMinValue() { return 1; }
250 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
251 virtual unsigned int GetDegreeMaxValue() { return static_cast<int>(~0u >> 1); }
252 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
253 virtual unsigned int GetDegree() { return 4; }
255
257
262 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
263 void SetLocator(vtkIncrementalPointLocator* locator);
264 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
265 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
267
272 VTK_DEPRECATED_IN_9_2_0("This method is no longer used and has no effect.")
273 void CreateDefaultLocator();
274
275 // The following are methods compatible with vtkDataSetSurfaceFilter.
276
278
283 vtkSetMacro(PieceInvariant, int);
284 vtkGetMacro(PieceInvariant, int);
286
288
296 vtkSetMacro(PassThroughCellIds, vtkTypeBool);
297 vtkGetMacro(PassThroughCellIds, vtkTypeBool);
298 vtkBooleanMacro(PassThroughCellIds, vtkTypeBool);
299 vtkSetMacro(PassThroughPointIds, vtkTypeBool);
300 vtkGetMacro(PassThroughPointIds, vtkTypeBool);
301 vtkBooleanMacro(PassThroughPointIds, vtkTypeBool);
303
305
311 vtkSetStringMacro(OriginalCellIdsName);
312 virtual const char* GetOriginalCellIdsName()
313 {
314 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
315 }
316 vtkSetStringMacro(OriginalPointIdsName);
317 virtual const char* GetOriginalPointIdsName()
318 {
319 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
320 }
322
324
339
341
352 vtkSetMacro(NonlinearSubdivisionLevel, int);
353 vtkGetMacro(NonlinearSubdivisionLevel, int);
355
357
360 vtkSetMacro(Delegation, vtkTypeBool);
361 vtkGetMacro(Delegation, vtkTypeBool);
362 vtkBooleanMacro(Delegation, vtkTypeBool);
364
366
376 vtkSetMacro(RemoveGhostInterfaces, bool);
377 vtkBooleanMacro(RemoveGhostInterfaces, bool);
378 vtkGetMacro(RemoveGhostInterfaces, bool);
380
382
389
391 vtkDataSet* input, vtkPolyData* output, vtkGeometryFilterHelper* info, vtkPolyData* exc);
392 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
393
395 vtkPolyData* exc, bool* extractFace = nullptr);
396 virtual int StructuredExecute(
397 vtkDataSet* input, vtkPolyData* output, vtkInformation* inInfo, bool* extractFace = nullptr);
398
400 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
402
403protected:
406
408 int FillInputPortInformation(int port, vtkInformation* info) override;
409
410 // special cases for performance
412
417 double Extent[6];
423
426
428
429 // These methods support compatibility with vtkDataSetSurfaceFilter
433
436
438
440
441private:
442 vtkGeometryFilter(const vtkGeometryFilter&) = delete;
443 void operator=(const vtkGeometryFilter&) = delete;
444};
445
446#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:63
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:40
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:91
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(...)