VTK  9.3.1
vtkClipDataSet.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
51 #ifndef vtkClipDataSet_h
52 #define vtkClipDataSet_h
53 
54 #include "vtkFiltersGeneralModule.h" // For export macro
56 
57 VTK_ABI_NAMESPACE_BEGIN
58 class vtkCallbackCommand;
61 
62 class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
63 {
64 public:
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
72  static vtkClipDataSet* New();
73 
75 
81  vtkSetMacro(Value, double);
82  vtkGetMacro(Value, double);
84 
86 
91  vtkSetMacro(UseValueAsOffset, bool);
92  vtkGetMacro(UseValueAsOffset, bool);
93  vtkBooleanMacro(UseValueAsOffset, bool);
95 
97 
105  vtkSetMacro(InsideOut, vtkTypeBool);
106  vtkGetMacro(InsideOut, vtkTypeBool);
107  vtkBooleanMacro(InsideOut, vtkTypeBool);
109 
111 
116  virtual void SetClipFunction(vtkImplicitFunction*);
117  vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
119 
121 
127  vtkSetMacro(GenerateClipScalars, vtkTypeBool);
128  vtkGetMacro(GenerateClipScalars, vtkTypeBool);
129  vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
131 
133 
137  vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
138  vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
139  vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
141 
143 
149  vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
150  vtkGetMacro(MergeTolerance, double);
152 
156  vtkUnstructuredGrid* GetClippedOutput();
157 
159 
163  void SetLocator(vtkIncrementalPointLocator* locator);
164  vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
166 
171  void CreateDefaultLocator();
172 
176  vtkMTimeType GetMTime() override;
177 
179 
184  vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
185  vtkGetMacro(OutputPointsPrecision, int);
187 
189 
192  vtkGetMacro(StableClipNonLinear, bool);
193  vtkSetMacro(StableClipNonLinear, bool);
194  vtkBooleanMacro(StableClipNonLinear, bool);
196 
197 protected:
198  vtkClipDataSet(vtkImplicitFunction* cf = nullptr);
199  ~vtkClipDataSet() override;
200 
202  int FillInputPortInformation(int port, vtkInformation* info) override;
204 
207  double Value;
209 
212 
213  // Callback registered with the InternalProgressObserver.
214  static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
215  void InternalProgressCallback(vtkAlgorithm* algorithm);
216  // The observer to report progress from the internal readers.
218 
219  // helper functions
220  void ClipVolume(vtkDataSet* input, vtkUnstructuredGrid* output);
221 
222  int ClipPoints(
223  vtkDataSet* input, vtkUnstructuredGrid* output, vtkInformationVector** inputVector);
224 
227 
228  bool StableClipNonLinear = true;
229 
230 private:
231  vtkClipDataSet(const vtkClipDataSet&) = delete;
232  void operator=(const vtkClipDataSet&) = delete;
233 };
234 
235 VTK_ABI_NAMESPACE_END
236 #endif
abstract interface for implicit functions
vtkIncrementalPointLocator * Locator
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:51
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeBool GenerateClipScalars
int vtkTypeBool
Definition: vtkABI.h:64
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
supports function callbacks
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
a simple class to control print indentation
Definition: vtkIndent.h:28
dataset represents arbitrary combinations of all possible cell types
vtkImplicitFunction * ClipFunction
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkTypeBool GenerateClippedOutput
Superclass for algorithms that produce only unstructured grid as output.
vtkCallbackCommand * InternalProgressObserver
clip any dataset with user-specified implicit function or input scalar data
Store zero or more vtkInformation instances.
vtkTypeBool InsideOut