VTK  9.6.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
50
51#ifndef vtkClipDataSet_h
52#define vtkClipDataSet_h
53
54#include "vtkFiltersGeneralModule.h" // For export macro
56
57VTK_ABI_NAMESPACE_BEGIN
59class vtkCellArray;
60class vtkCellData;
64
65class VTKFILTERSGENERAL_EXPORT vtkClipDataSet : public vtkUnstructuredGridAlgorithm
66{
67public:
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
76
78
84 vtkSetMacro(Value, double);
85 vtkGetMacro(Value, double);
87
89
94 vtkSetMacro(UseValueAsOffset, bool);
95 vtkGetMacro(UseValueAsOffset, bool);
96 vtkBooleanMacro(UseValueAsOffset, bool);
98
100
108 vtkSetMacro(InsideOut, vtkTypeBool);
109 vtkGetMacro(InsideOut, vtkTypeBool);
110 vtkBooleanMacro(InsideOut, vtkTypeBool);
112
114
122
124
134
136
144
146
152 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
153 vtkGetMacro(MergeTolerance, double);
155
160
162
169
175
180
182
188 vtkGetMacro(OutputPointsPrecision, int);
190
192
195 vtkGetMacro(StableClipNonLinear, bool);
196 vtkSetMacro(StableClipNonLinear, bool);
197 vtkBooleanMacro(StableClipNonLinear, bool);
199
200protected:
202 ~vtkClipDataSet() override;
203
205 int FillInputPortInformation(int port, vtkInformation* info) override;
207
210 double Value;
212
215
216 // Callback registered with the InternalProgressObserver.
217 static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void* clientdata, void*);
219 // The observer to report progress from the internal readers.
221
222 // helper functions
224
226 vtkDataSet* input, vtkUnstructuredGrid* output, vtkInformationVector** inputVector);
227
230
232
233private:
234 vtkClipDataSet(const vtkClipDataSet&) = delete;
235 void operator=(const vtkClipDataSet&) = delete;
236
241 vtkIdType SeparateCellIds(vtkIdType numCells, vtkDataSet* input, std::vector<vtkIdType>& pointMap,
242 std::vector<vtkIdType>& clippingCellIds, double clipValue, vtkDataArray* clipScalars,
243 std::array<std::vector<vtkIdType>, 2>& intactCellIds);
244
248 void FillIntactCells(vtkDataSet* input, int numOutputs,
249 std::array<std::vector<vtkIdType>, 2>& intactCellIds, std::vector<vtkIdType>& pointMap,
250 vtkSmartPointer<vtkCellArray> conn[2], vtkCellData* outCD[2], vtkCellData* inCD,
252};
253
254VTK_ABI_NAMESPACE_END
255#endif
supports function callbacks
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:32
int FillInputPortInformation(int port, vtkInformation *info) override
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:57
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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Hold a reference to a vtkObjectBase instance.
dynamic, self-adjusting array of unsigned char
dataset represents arbitrary combinations of all possible cell types
int vtkTypeBool
Definition vtkABI.h:64
#define vtkDataArray
int vtkIdType
Definition vtkType.h:368
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:323
#define vtkAlgorithm