VTK  9.4.20250104
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
116#ifndef vtkTableBasedClipDataSet_h
117#define vtkTableBasedClipDataSet_h
118
119#include "vtkFiltersGeneralModule.h" // For export macro
120#include "vtkIncrementalPointLocator.h" // For vtkIncrementalPointLocator
122#include "vtkWeakPointer.h" // Needed for weak pointer to the vtkIncrementalPointLocator
123
124VTK_ABI_NAMESPACE_BEGIN
126class vtkDoubleArray;
128class vtkPolyData;
129
130class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
131{
132public:
134 void PrintSelf(ostream& os, vtkIndent indent) override;
135
141
146
148
155 vtkSetMacro(InsideOut, vtkTypeBool);
156 vtkGetMacro(InsideOut, vtkTypeBool);
157 vtkBooleanMacro(InsideOut, vtkTypeBool);
159
161
167 vtkSetMacro(Value, double);
168 vtkGetMacro(Value, double);
170
172
177 vtkSetMacro(UseValueAsOffset, bool);
178 vtkGetMacro(UseValueAsOffset, bool);
179 vtkBooleanMacro(UseValueAsOffset, bool);
181
183
189 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
191
193
199 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
200 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
201 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
203
205
211 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
212 vtkGetMacro(MergeTolerance, double);
214
216
220 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
221 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
222 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
224
229
231
236 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
237 vtkGetMacro(OutputPointsPrecision, int);
239
241
249 vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
250 vtkGetMacro(BatchSize, unsigned int);
252
254
259 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
261
262protected:
265
267 int FillInputPortInformation(int port, vtkInformation* info) override;
268
269private:
275 void ClipDataSet(vtkDataSet* pDataSet, vtkUnstructuredGrid* outputUG);
276
283 void ClipPolyData(vtkPolyData* inputGrid, vtkImplicitFunction* implicitFunction,
284 vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
285
292 template <class TGrid>
293 void ClipTDataSet(TGrid* inputGrid, vtkImplicitFunction* implicitFunction,
294 vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
295
299 template <typename TGrid, typename TInputIdType, bool InsideOut>
301 TGrid* input, vtkImplicitFunction* implicitFunction, vtkDoubleArray* scalars, double isoValue);
302
306 static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
307
311 void InternalProgressCallback(vtkAlgorithm* algorithm);
312
313protected:
318 double Value;
322 unsigned int BatchSize;
323
325
327
328private:
330 void operator=(const vtkTableBasedClipDataSet&) = delete;
331};
332
333VTK_ABI_NAMESPACE_END
334#endif
Superclass for all sources, filters, and sinks in VTK.
supports function callbacks
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
dynamic, self-adjusting array of double
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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition vtkObject.h:162
concrete dataset represents vertices, lines, polygons, and triangle strips
Hold a reference to a vtkObjectBase instance.
Clip any dataset with a user-specified implicit function or an input scalar point data array.
vtkTableBasedClipDataSet(vtkImplicitFunction *cf=nullptr)
static vtkTableBasedClipDataSet * New()
Create an instance with a user-specified implicit function, turning off IVARs InsideOut and GenerateC...
~vtkTableBasedClipDataSet() override
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
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.
vtkWeakPointer< vtkIncrementalPointLocator > Locator
vtkCallbackCommand * InternalProgressObserver
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
a weak reference to a vtkObject.
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_INT_MAX
Definition vtkType.h:144