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 
105 class vtkCallbackCommand;
106 class vtkImplicitFunction;
108 
109 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
110 {
111 public:
113  void PrintSelf(ostream& os, vtkIndent indent) override;
114 
119  static vtkClipDataSet* New();
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 
223  vtkMTimeType GetMTime() override;
224 
226 
231  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
232  vtkGetMacro(OutputPointsPrecision, int);
234 
235 protected:
237  ~vtkClipDataSet() override;
238 
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 
266 private:
267  vtkClipDataSet(const vtkClipDataSet&) = delete;
268  void operator=(const vtkClipDataSet&) = delete;
269 };
270 
271 #endif
vtkClipDataSet::GetMTime
vtkMTimeType GetMTime() override
Return the mtime also considering the locator and clip function.
vtkClipDataSet::SetClipFunction
virtual void SetClipFunction(vtkImplicitFunction *)
Specify the implicit function with which to perform the clipping.
vtkClipDataSet::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:123
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkClipDataSet::InternalProgressCallbackFunction
static void InternalProgressCallbackFunction(vtkObject *, unsigned long, void *clientdata, void *)
vtkClipDataSet::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkClipDataSet::GetClippedOutput
vtkUnstructuredGrid * GetClippedOutput()
Return the Clipped output.
vtkClipDataSet::InternalProgressCallback
void InternalProgressCallback(vtkAlgorithm *algorithm)
vtkClipDataSet
clip any dataset with user-specified implicit function or input scalar data
Definition: vtkClipDataSet.h:110
vtkClipDataSet::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkClipDataSet.h:243
vtkClipDataSet::ClipFunction
vtkImplicitFunction * ClipFunction
Definition: vtkClipDataSet.h:241
vtkClipDataSet::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkClipDataSet::UseValueAsOffset
bool UseValueAsOffset
Definition: vtkClipDataSet.h:263
vtkClipDataSet::GenerateClipScalars
vtkTypeBool GenerateClipScalars
Definition: vtkClipDataSet.h:246
vtkClipDataSet::~vtkClipDataSet
~vtkClipDataSet() override
vtkClipDataSet::ClipVolume
void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output)
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:80
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkClipDataSet::InternalProgressObserver
vtkCallbackCommand * InternalProgressObserver
Definition: vtkClipDataSet.h:255
vtkClipDataSet::ClipPoints
int ClipPoints(vtkDataSet *input, vtkUnstructuredGrid *output, vtkInformationVector **inputVector)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkClipDataSet::Value
double Value
Definition: vtkClipDataSet.h:245
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkClipDataSet::GenerateClippedOutput
vtkTypeBool GenerateClippedOutput
Definition: vtkClipDataSet.h:248
vtkClipDataSet::CreateDefaultLocator
void CreateDefaultLocator()
Create default locator.
vtkClipDataSet::New
static vtkClipDataSet * New()
Construct with user-specified implicit function; InsideOut turned off; value set to 0....
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkClipDataSet::InsideOut
vtkTypeBool InsideOut
Definition: vtkClipDataSet.h:244
vtkClipDataSet::vtkClipDataSet
vtkClipDataSet(vtkImplicitFunction *cf=nullptr)
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:154
vtkClipDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkUnstructuredGridAlgorithm.h
vtkClipDataSet::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkClipDataSet.h:264
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkClipDataSet::MergeTolerance
double MergeTolerance
Definition: vtkClipDataSet.h:249
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287