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 
83 #ifndef vtkTableBasedClipDataSet_h
84 #define vtkTableBasedClipDataSet_h
85 
86 #include "vtkFiltersGeneralModule.h" // For export macro
87 #include "vtkIncrementalPointLocator.h" // For vtkIncrementalPointLocator
89 #include "vtkWeakPointer.h" // Needed for weak pointer to the vtkIncrementalPointLocator
90 
91 VTK_ABI_NAMESPACE_BEGIN
92 class vtkCallbackCommand;
93 class vtkDoubleArray;
95 
96 class VTKFILTERSGENERAL_EXPORT vtkTableBasedClipDataSet : public vtkUnstructuredGridAlgorithm
97 {
98 public:
100  void PrintSelf(ostream& os, vtkIndent indent) override;
101 
107 
111  vtkMTimeType GetMTime() override;
112 
114 
121  vtkSetMacro(InsideOut, vtkTypeBool);
122  vtkGetMacro(InsideOut, vtkTypeBool);
123  vtkBooleanMacro(InsideOut, vtkTypeBool);
125 
127 
133  vtkSetMacro(Value, double);
134  vtkGetMacro(Value, double);
136 
138 
143  vtkSetMacro(UseValueAsOffset, bool);
144  vtkGetMacro(UseValueAsOffset, bool);
145  vtkBooleanMacro(UseValueAsOffset, bool);
147 
149 
155  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
157 
159 
165  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
166  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
167  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
169 
171 
177  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
178  vtkGetMacro(MergeTolerance, double);
180 
182 
186  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
187  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
188  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
190 
195 
197 
202  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
203  vtkGetMacro(OutputPointsPrecision, int);
205 
207 
215  vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
216  vtkGetMacro(BatchSize, unsigned int);
218 
220 
225  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
227 
228 protected:
231 
234 
235 private:
241  void ClipDataSet(vtkDataSet* pDataSet, vtkUnstructuredGrid* outputUG);
242 
249  void ClipImageData(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
250  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
251 
258  void ClipPolyData(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
259  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
260 
267  void ClipRectilinearGrid(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
268  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
269 
276  void ClipStructuredGrid(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
277  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
278 
285  void ClipUnstructuredGrid(vtkDataSet* inputGrid, vtkImplicitFunction* implicitFunction,
286  vtkDoubleArray* scalars, double isoValue, vtkUnstructuredGrid* outputUG);
287 
292  bool CanFullyProcessUnstructuredData(vtkDataSet* inputGrid);
293 
297  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
298 
302  void InternalProgressCallback(vtkAlgorithm* algorithm);
303 
304 protected:
309  double Value;
313  unsigned int BatchSize;
314 
316 
318 
319 private:
321  void operator=(const vtkTableBasedClipDataSet&) = delete;
322 };
323 
324 VTK_ABI_NAMESPACE_END
325 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
supports function callbacks
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:61
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