VTK  9.3.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 
74 #ifndef vtkTableBasedClipDataSet_h
75 #define vtkTableBasedClipDataSet_h
76 
77 #include "vtkFiltersGeneralModule.h" // For export macro
78 #include "vtkIncrementalPointLocator.h" // For vtkIncrementalPointLocator
80 #include "vtkWeakPointer.h" // Needed for weak pointer to the vtkIncrementalPointLocator
81 
82 VTK_ABI_NAMESPACE_BEGIN
83 class vtkCallbackCommand;
84 class vtkDoubleArray;
86 
87 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
88 {
89 public:
91  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
98 
102  vtkMTimeType GetMTime() override;
103 
105 
112  vtkSetMacro(InsideOut, vtkTypeBool);
113  vtkGetMacro(InsideOut, vtkTypeBool);
114  vtkBooleanMacro(InsideOut, vtkTypeBool);
116 
118 
124  vtkSetMacro(Value, double);
125  vtkGetMacro(Value, double);
127 
129 
134  vtkSetMacro(UseValueAsOffset, bool);
135  vtkGetMacro(UseValueAsOffset, bool);
136  vtkBooleanMacro(UseValueAsOffset, bool);
138 
140 
146  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
148 
150 
156  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
157  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
158  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
160 
162 
168  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
169  vtkGetMacro(MergeTolerance, double);
171 
173 
177  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
178  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
179  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
181 
186 
188 
193  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
194  vtkGetMacro(OutputPointsPrecision, int);
196 
198 
206  vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
207  vtkGetMacro(BatchSize, unsigned int);
209 
211 
216  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
218 
219 protected:
222 
225 
226 private:
232  void ClipDataSet(vtkDataSet* pDataSet, vtkUnstructuredGrid* outputUG);
233 
240  void ClipImageData(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
241  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
242 
249  void ClipPolyData(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
250  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
251 
258  void ClipRectilinearGrid(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
259  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
260 
267  void ClipStructuredGrid(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
268  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
269 
276  void ClipUnstructuredGrid(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
277  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
278 
283  bool CanFullyProcessUnstructuredData(vtkDataSet* inputGrid);
284 
288  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
289 
293  void InternalProgressCallback(vtkAlgorithm* algorithm);
294 
295 protected:
300  double Value;
304  unsigned int BatchSize;
305 
307 
309 
310 private:
312  void operator=(const vtkTableBasedClipDataSet&) = delete;
313 };
314 
315 VTK_ABI_NAMESPACE_END
316 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:52
supports function callbacks
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:52
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.
vtkImplicitFunction * ClipFunction
virtual void SetClipFunction(vtkImplicitFunction *)
Set/Get the implicit function with which to perform the clipping operation.
vtkUnstructuredGrid * GetClippedOutput()
Return the clipped output.
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.
vtkWeakPointer< vtkIncrementalPointLocator > Locator
vtkCallbackCommand * InternalProgressObserver
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_INT_MAX
Definition: vtkType.h:144