VTK  9.3.20240424
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
113#ifndef vtkTableBasedClipDataSet_h
114#define vtkTableBasedClipDataSet_h
115
116#include "vtkFiltersGeneralModule.h" // For export macro
117#include "vtkIncrementalPointLocator.h" // For vtkIncrementalPointLocator
119#include "vtkWeakPointer.h" // Needed for weak pointer to the vtkIncrementalPointLocator
120
121VTK_ABI_NAMESPACE_BEGIN
123class vtkDoubleArray;
125class vtkPolyData;
126
127class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
128{
129public:
131 void PrintSelf(ostream& os, vtkIndent indent) override;
132
138
143
145
152 vtkSetMacro(InsideOut, vtkTypeBool);
153 vtkGetMacro(InsideOut, vtkTypeBool);
154 vtkBooleanMacro(InsideOut, vtkTypeBool);
156
158
164 vtkSetMacro(Value, double);
165 vtkGetMacro(Value, double);
167
169
174 vtkSetMacro(UseValueAsOffset, bool);
175 vtkGetMacro(UseValueAsOffset, bool);
176 vtkBooleanMacro(UseValueAsOffset, bool);
178
180
186 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
188
190
196 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
197 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
198 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
200
202
208 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
209 vtkGetMacro(MergeTolerance, double);
211
213
217 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
218 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
219 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
221
226
228
233 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
234 vtkGetMacro(OutputPointsPrecision, int);
236
238
246 vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
247 vtkGetMacro(BatchSize, unsigned int);
249
251
256 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
258
259protected:
262
264 int FillInputPortInformation(int port, vtkInformation* info) override;
265
266private:
272 void ClipDataSet(vtkDataSet* pDataSet, vtkUnstructuredGrid* outputUG);
273
280 void ClipPolyData(vtkPolyData* inputGrid, vtkImplicitFunction* implicitFunction,
281 vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
282
289 template <class TGrid>
290 void ClipTDataSet(TGrid* inputGrid, vtkImplicitFunction* implicitFunction,
291 vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
292
296 template <typename TGrid, typename TInputIdType, bool InsideOut>
298 TGrid* input, vtkImplicitFunction* implicitFunction, vtkDoubleArray* scalars, double isoValue);
299
303 static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
304
308 void InternalProgressCallback(vtkAlgorithm* algorithm);
309
310protected:
315 double Value;
319 unsigned int BatchSize;
320
322
324
325private:
327 void operator=(const vtkTableBasedClipDataSet&) = delete;
328};
329
330VTK_ABI_NAMESPACE_END
331#endif
Superclass for all sources, filters, and sinks in VTK.
supports function callbacks
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
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