VTK  9.3.20240328
vtkClipDataSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
90 #ifndef vtkClipDataSet_h
91 #define vtkClipDataSet_h
92 
93 #include "vtkFiltersGeneralModule.h" // For export macro
95 
96 VTK_ABI_NAMESPACE_BEGIN
97 class vtkCallbackCommand;
100 
101 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
102 {
103 public:
105  void PrintSelf(ostream& os, vtkIndent indent) override;
106 
111  static vtkClipDataSet* New();
112 
114 
120  vtkSetMacro(Value, double);
121  vtkGetMacro(Value, double);
123 
125 
130  vtkSetMacro(UseValueAsOffset, bool);
131  vtkGetMacro(UseValueAsOffset, bool);
132  vtkBooleanMacro(UseValueAsOffset, bool);
134 
136 
144  vtkSetMacro(InsideOut, vtkTypeBool);
145  vtkGetMacro(InsideOut, vtkTypeBool);
146  vtkBooleanMacro(InsideOut, vtkTypeBool);
148 
150 
156  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
158 
160 
166  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
167  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
168  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
170 
172 
176  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
177  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
178  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
180 
182 
188  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
189  vtkGetMacro(MergeTolerance, double);
191 
196 
198 
203  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
205 
211 
215  vtkMTimeType GetMTime() override;
216 
218 
223  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
224  vtkGetMacro(OutputPointsPrecision, int);
226 
228 
231  vtkGetMacro(StableClipNonLinear, bool);
232  vtkSetMacro(StableClipNonLinear, bool);
233  vtkBooleanMacro(StableClipNonLinear, bool);
235 
236 protected:
238  ~vtkClipDataSet() override;
239 
243 
246  double Value;
248 
251 
252  // Callback registered with the InternalProgressObserver.
253  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
255  // The observer to report progress from the internal readers.
257 
258  // helper functions
260 
262  vtkDataSet* input, vtkUnstructuredGrid* output, vtkInformationVector** inputVector);
263 
266 
267  bool StableClipNonLinear = true;
268 
269 private:
270  vtkClipDataSet(const vtkClipDataSet&) = delete;
271  void operator=(const vtkClipDataSet&) = delete;
272 };
273 
274 VTK_ABI_NAMESPACE_END
275 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:161
supports function callbacks
clip any dataset with user-specified implicit function or input scalar data
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeBool GenerateClippedOutput
vtkCallbackCommand * InternalProgressObserver
virtual void SetClipFunction(vtkImplicitFunction *)
Specify the implicit function with which to perform the clipping.
~vtkClipDataSet() override
static void InternalProgressCallbackFunction(vtkObject *, unsigned long, void *clientdata, void *)
vtkTypeBool InsideOut
vtkUnstructuredGrid * GetClippedOutput()
Return the Clipped output.
void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output)
vtkIncrementalPointLocator * Locator
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
int ClipPoints(vtkDataSet *input, vtkUnstructuredGrid *output, vtkInformationVector **inputVector)
vtkImplicitFunction * ClipFunction
vtkClipDataSet(vtkImplicitFunction *cf=nullptr)
vtkMTimeType GetMTime() override
Return the mtime also considering the locator and clip function.
void InternalProgressCallback(vtkAlgorithm *algorithm)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CreateDefaultLocator()
Create default locator.
static vtkClipDataSet * New()
Construct with user-specified implicit function; InsideOut turned off; value set to 0....
vtkTypeBool GenerateClipScalars
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
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:161
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