VTK  9.1.0
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=========================================================================*/
99#ifndef vtkClipDataSet_h
100#define vtkClipDataSet_h
101
102#include "vtkFiltersGeneralModule.h" // For export macro
104
108
109class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
110{
111public:
113 void PrintSelf(ostream& os, vtkIndent indent) override;
114
120
122
128 vtkSetMacro(Value, double);
129 vtkGetMacro(Value, double);
131
133
138 vtkSetMacro(UseValueAsOffset, bool);
139 vtkGetMacro(UseValueAsOffset, bool);
140 vtkBooleanMacro(UseValueAsOffset, bool);
142
144
152 vtkSetMacro(InsideOut, vtkTypeBool);
153 vtkGetMacro(InsideOut, vtkTypeBool);
154 vtkBooleanMacro(InsideOut, vtkTypeBool);
156
158
164 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
166
168
174 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
175 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
176 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
178
180
184 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
185 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
186 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
188
190
196 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
197 vtkGetMacro(MergeTolerance, double);
199
204
206
211 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
213
219
224
226
231 vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
232 vtkGetMacro(OutputPointsPrecision, int);
234
235protected:
237 ~vtkClipDataSet() override;
238
240 int FillInputPortInformation(int port, vtkInformation* info) override;
242
245 double Value;
247
250
251 // Callback registered with the InternalProgressObserver.
252 static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
254 // The observer to report progress from the internal readers.
256
257 // helper functions
259
261 vtkDataSet* input, vtkUnstructuredGrid* output, vtkInformationVector** inputVector);
262
265
266private:
267 vtkClipDataSet(const vtkClipDataSet&) = delete;
268 void operator=(const vtkClipDataSet&) = delete;
269};
270
271#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:123
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
vtkUnstructuredGrid * GetClippedOutput()
Return the Clipped output.
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
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.
static vtkClipDataSet * New()
Construct with user-specified implicit function; InsideOut turned off; value set to 0....
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.
vtkTypeBool GenerateClipScalars
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
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:113
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
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287