VTK
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 =========================================================================*/
63 #ifndef vtkClipDataSet_h
64 #define vtkClipDataSet_h
65 
66 #include "vtkFiltersGeneralModule.h" // For export macro
68 
69 class vtkCallbackCommand;
72 
73 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
74 {
75 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
83  static vtkClipDataSet *New();
84 
86 
92  vtkSetMacro(Value,double);
93  vtkGetMacro(Value,double);
95 
97 
102  vtkSetMacro(UseValueAsOffset, bool);
103  vtkGetMacro(UseValueAsOffset, bool);
104  vtkBooleanMacro(UseValueAsOffset, bool);
106 
108 
116  vtkSetMacro(InsideOut,vtkTypeBool);
117  vtkGetMacro(InsideOut,vtkTypeBool);
118  vtkBooleanMacro(InsideOut,vtkTypeBool);
120 
122 
128  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
130 
132 
138  vtkSetMacro(GenerateClipScalars,vtkTypeBool);
139  vtkGetMacro(GenerateClipScalars,vtkTypeBool);
140  vtkBooleanMacro(GenerateClipScalars,vtkTypeBool);
142 
144 
148  vtkSetMacro(GenerateClippedOutput,vtkTypeBool);
149  vtkGetMacro(GenerateClippedOutput,vtkTypeBool);
150  vtkBooleanMacro(GenerateClippedOutput,vtkTypeBool);
152 
154 
160  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
161  vtkGetMacro(MergeTolerance,double);
163 
168 
170 
175  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
177 
183 
187  vtkMTimeType GetMTime() override;
188 
190 
195  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
196  vtkGetMacro(OutputPointsPrecision, int);
198 
199 protected:
201  ~vtkClipDataSet() override;
202 
206 
209  double Value;
211 
214 
215  // Callback registered with the InternalProgressObserver.
216  static void InternalProgressCallbackFunction(vtkObject*, unsigned long,
217  void* clientdata, void*);
219  // The observer to report progress from the internal readers.
221 
222  //helper functions
224 
226  vtkInformationVector** inputVector);
227 
230 
231 private:
232  vtkClipDataSet(const vtkClipDataSet&) = delete;
233  void operator=(const vtkClipDataSet&) = delete;
234 };
235 
236 #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:60
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
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:60
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:74
vtkClipDataSet::Locator
vtkIncrementalPointLocator * Locator
Definition: vtkClipDataSet.h:207
vtkClipDataSet::ClipFunction
vtkImplicitFunction * ClipFunction
Definition: vtkClipDataSet.h:205
vtkClipDataSet::SetLocator
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
vtkClipDataSet::UseValueAsOffset
bool UseValueAsOffset
Definition: vtkClipDataSet.h:228
vtkClipDataSet::GenerateClipScalars
vtkTypeBool GenerateClipScalars
Definition: vtkClipDataSet.h:210
vtkClipDataSet::~vtkClipDataSet
~vtkClipDataSet() override
vtkClipDataSet::ClipVolume
void ClipVolume(vtkDataSet *input, vtkUnstructuredGrid *output)
vtkImplicitFunction
abstract interface for implicit functions
Definition: vtkImplicitFunction.h:61
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkClipDataSet::InternalProgressObserver
vtkCallbackCommand * InternalProgressObserver
Definition: vtkClipDataSet.h:220
vtkClipDataSet::ClipPoints
int ClipPoints(vtkDataSet *input, vtkUnstructuredGrid *output, vtkInformationVector **inputVector)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkClipDataSet::Value
double Value
Definition: vtkClipDataSet.h:209
vtkIncrementalPointLocator
Abstract class in support of both point location and point insertion.
Definition: vtkIncrementalPointLocator.h:52
vtkClipDataSet::GenerateClippedOutput
vtkTypeBool GenerateClippedOutput
Definition: vtkClipDataSet.h:212
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:63
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkClipDataSet::InsideOut
vtkTypeBool InsideOut
Definition: vtkClipDataSet.h:208
vtkClipDataSet::vtkClipDataSet
vtkClipDataSet(vtkImplicitFunction *cf=nullptr)
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:51
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:229
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:89
vtkClipDataSet::MergeTolerance
double MergeTolerance
Definition: vtkClipDataSet.h:213
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302