VTK  9.7.0
vtkTableBasedClipDataSet.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) 2000 - 2009, Lawrence Livermore National Security, LLC
3// SPDX-License-Identifier: BSD-3-Clause
4
79
80#ifndef vtkTableBasedClipDataSet_h
81#define vtkTableBasedClipDataSet_h
82
83#include "vtkFiltersGeneralModule.h" // For export macro
84#include "vtkIncrementalPointLocator.h" // For vtkIncrementalPointLocator
86#include "vtkWeakPointer.h" // Needed for weak pointer to the vtkIncrementalPointLocator
87
88VTK_ABI_NAMESPACE_BEGIN
90class vtkDataArray;
92class vtkPolyData;
93
94class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
95{
96public:
98 void PrintSelf(ostream& os, vtkIndent indent) override;
99
105
110
112
119 vtkSetMacro(InsideOut, vtkTypeBool);
120 vtkGetMacro(InsideOut, vtkTypeBool);
121 vtkBooleanMacro(InsideOut, vtkTypeBool);
123
125
131 vtkSetMacro(Value, double);
132 vtkGetMacro(Value, double);
134
136
141 vtkSetMacro(UseValueAsOffset, bool);
142 vtkGetMacro(UseValueAsOffset, bool);
143 vtkBooleanMacro(UseValueAsOffset, bool);
145
147
155
157
167
175 {
179 };
180
182
191 vtkSetMacro(GenerateClipPointTypes, bool);
192 vtkGetMacro(GenerateClipPointTypes, bool);
193 vtkBooleanMacro(GenerateClipPointTypes, bool);
195
200 static const char* GetPointTypesArrayName() { return "vtkClipPointTypes"; }
201
203
209 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
210 vtkGetMacro(MergeTolerance, double);
212
214
222
227
229
235 vtkGetMacro(OutputPointsPrecision, int);
237
239
247 vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
248 vtkGetMacro(BatchSize, unsigned int);
250
252
259
260protected:
263
265 int FillInputPortInformation(int port, vtkInformation* info) override;
266
267private:
273 void ClipDataSet(vtkDataSet* pDataSet, vtkUnstructuredGrid* outputUG);
274
281 void ClipPolyData(
282 vtkPolyData* inputGrid, vtkDataArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
283
290 template <class TGrid>
291 void ClipTDataSet(
292 TGrid* inputGrid, vtkDataArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
293
297 template <typename TGrid, typename TInputIdType, bool InsideOut>
299 TGrid* input, vtkDataArray* scalars, double isoValue);
300
304 static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
305
309 void InternalProgressCallback(vtkAlgorithm* algorithm);
310
311protected:
316 double Value;
320 unsigned int BatchSize;
321
323
325
326private:
328 void operator=(const vtkTableBasedClipDataSet&) = delete;
329
330 bool GenerateClipPointTypes;
331};
332
333VTK_ABI_NAMESPACE_END
334#endif
supports function callbacks
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
abstract interface for implicit functions
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:72
Hold a reference to a vtkObjectBase instance.
vtkTableBasedClipDataSet(vtkImplicitFunction *cf=nullptr)
static vtkTableBasedClipDataSet * New()
Create an instance with a user-specified implicit function, turning off IVARs InsideOut and GenerateC...
PointTypes
PointType enum can be used to flag point origin.
~vtkTableBasedClipDataSet() override
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
int FillInputPortInformation(int port, vtkInformation *info) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual void SetClipFunction(vtkImplicitFunction *)
Set/Get the implicit function with which to perform the clipping operation.
vtkMTimeType GetMTime() override
Get the MTime for which the clip function are considered.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGrid * GetClippedOutput()
Return the clipped output.
static const char * GetPointTypesArrayName()
Return the array name used classify the points from their origin.
vtkWeakPointer< vtkIncrementalPointLocator > Locator
vtkCallbackCommand * InternalProgressObserver
dataset represents arbitrary combinations of all possible cell types
a weak reference to a vtkObject.
int vtkTypeBool
Definition vtkABI.h:64
#define vtkDataArray
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_INT_MAX
Definition vtkType.h:192
#define vtkAlgorithm