VTK  9.6.20260615
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
118
119#ifndef vtkTableBasedClipDataSet_h
120#define vtkTableBasedClipDataSet_h
121
122#include "vtkFiltersGeneralModule.h" // For export macro
123#include "vtkIncrementalPointLocator.h" // For vtkIncrementalPointLocator
125#include "vtkWeakPointer.h" // Needed for weak pointer to the vtkIncrementalPointLocator
126
127VTK_ABI_NAMESPACE_BEGIN
129class vtkDataArray;
131class vtkPolyData;
132
133class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
134{
135public:
137 void PrintSelf(ostream& os, vtkIndent indent) override;
138
144
149
151
158 vtkSetMacro(InsideOut, vtkTypeBool);
159 vtkGetMacro(InsideOut, vtkTypeBool);
160 vtkBooleanMacro(InsideOut, vtkTypeBool);
162
164
170 vtkSetMacro(Value, double);
171 vtkGetMacro(Value, double);
173
175
180 vtkSetMacro(UseValueAsOffset, bool);
181 vtkGetMacro(UseValueAsOffset, bool);
182 vtkBooleanMacro(UseValueAsOffset, bool);
184
186
194
196
202 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
203 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
204 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
206
219
221
230 vtkSetMacro(GenerateClipPointTypes, bool);
231 vtkGetMacro(GenerateClipPointTypes, bool);
232 vtkBooleanMacro(GenerateClipPointTypes, bool);
234
239 static const char* GetPointTypesArrayName() { return "vtkClipPointTypes"; }
240
242
248 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
249 vtkGetMacro(MergeTolerance, double);
251
253
261
266
268
274 vtkGetMacro(OutputPointsPrecision, int);
276
278
286 vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
287 vtkGetMacro(BatchSize, unsigned int);
289
291
298
299protected:
302
304 int FillInputPortInformation(int port, vtkInformation* info) override;
305
306private:
312 void ClipDataSet(vtkDataSet* pDataSet, vtkUnstructuredGrid* outputUG);
313
320 void ClipPolyData(
321 vtkPolyData* inputGrid, vtkDataArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
322
329 template <class TGrid>
330 void ClipTDataSet(
331 TGrid* inputGrid, vtkDataArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
332
336 template <typename TGrid, typename TInputIdType, bool InsideOut>
338 TGrid* input, vtkDataArray* scalars, double isoValue);
339
343 static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
344
348 void InternalProgressCallback(vtkAlgorithm* algorithm);
349
350protected:
351 vtkTypeBool InsideOut;
352 vtkTypeBool GenerateClipScalars;
354 bool UseValueAsOffset;
355 double Value;
359 unsigned int BatchSize;
360
362
364
365private:
367 void operator=(const vtkTableBasedClipDataSet&) = delete;
368
369 bool GenerateClipPointTypes;
370};
371
372VTK_ABI_NAMESPACE_END
373#endif
supports function callbacks
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
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.
concrete dataset represents vertices, lines, polygons, and triangle strips
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
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.
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 vtkTableBasedClipDataSet
Definition vtkmClip.h:25