VTK  9.2.6
vtkClipDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkClipDataSet.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
72 #ifndef vtkClipDataSet_h
73 #define vtkClipDataSet_h
74 
75 #include "vtkFiltersGeneralModule.h" // For export macro
77 
78 class vtkCallbackCommand;
81 
82 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
92  static vtkClipDataSet* New();
93 
95 
101  vtkSetMacro(Value, double);
102  vtkGetMacro(Value, double);
104 
106 
111  vtkSetMacro(UseValueAsOffset, bool);
112  vtkGetMacro(UseValueAsOffset, bool);
113  vtkBooleanMacro(UseValueAsOffset, bool);
115 
117 
125  vtkSetMacro(InsideOut, vtkTypeBool);
126  vtkGetMacro(InsideOut, vtkTypeBool);
127  vtkBooleanMacro(InsideOut, vtkTypeBool);
129 
131 
137  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
139 
141 
147  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
148  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
149  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
151 
153 
157  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
158  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
159  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
161 
163 
169  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
170  vtkGetMacro(MergeTolerance, double);
172 
177 
179 
184  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
186 
192 
196  vtkMTimeType GetMTime() override;
197 
199 
204  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
205  vtkGetMacro(OutputPointsPrecision, int);
207 
208 protected:
210  ~vtkClipDataSet() override;
211 
215 
218  double Value;
220 
223 
224  // Callback registered with the InternalProgressObserver.
225  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
227  // The observer to report progress from the internal readers.
229 
230  // helper functions
232 
234  vtkDataSet* input, vtkUnstructuredGrid* output, vtkInformationVector** inputVector);
235 
238 
239 private:
240  vtkClipDataSet(const vtkClipDataSet&) = delete;
241  void operator=(const vtkClipDataSet&) = delete;
242 };
243 
244 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:72
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:72
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:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:72
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287