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 =========================================================================*/
102 #ifndef vtkClipDataSet_h
103 #define vtkClipDataSet_h
104 
105 #include "vtkFiltersGeneralModule.h" // For export macro
107 
108 class vtkCallbackCommand;
109 class vtkImplicitFunction;
111 
112 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
113 {
114 public:
116  void PrintSelf(ostream& os, vtkIndent indent) override;
117 
122  static vtkClipDataSet* New();
123 
125 
131  vtkSetMacro(Value, double);
132  vtkGetMacro(Value, double);
134 
136 
141  vtkSetMacro(UseValueAsOffset, bool);
142  vtkGetMacro(UseValueAsOffset, bool);
143  vtkBooleanMacro(UseValueAsOffset, bool);
145 
147 
155  vtkSetMacro(InsideOut, vtkTypeBool);
156  vtkGetMacro(InsideOut, vtkTypeBool);
157  vtkBooleanMacro(InsideOut, vtkTypeBool);
159 
161 
167  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
169 
171 
177  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
178  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
179  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
181 
183 
187  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
188  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
189  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
191 
193 
199  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
200  vtkGetMacro(MergeTolerance, double);
202 
207 
209 
214  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
216 
222 
226  vtkMTimeType GetMTime() override;
227 
229 
234  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
235  vtkGetMacro(OutputPointsPrecision, int);
237 
238 protected:
240  ~vtkClipDataSet() override;
241 
245 
248  double Value;
250 
253 
254  // Callback registered with the InternalProgressObserver.
255  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
257  // The observer to report progress from the internal readers.
259 
260  // helper functions
262 
264  vtkDataSet* input, vtkUnstructuredGrid* output, vtkInformationVector** inputVector);
265 
268 
269 private:
270  vtkClipDataSet(const vtkClipDataSet&) = delete;
271  void operator=(const vtkClipDataSet&) = delete;
272 };
273 
274 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:122
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:172
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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
abstract base class for most VTK objects
Definition: vtkObject.h:82
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