VTK  9.3.0
vtkClipVolume.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
52#ifndef vtkClipVolume_h
53#define vtkClipVolume_h
54
55#include "vtkFiltersGeneralModule.h" // For export macro
57
58VTK_ABI_NAMESPACE_BEGIN
59class vtkCellData;
60class vtkDataArray;
61class vtkIdList;
63class vtkMergePoints;
65class vtkPointData;
67class vtkPoints;
69class vtkCell;
70class vtkTetra;
71class vtkCellArray;
72class vtkIdTypeArray;
74
75class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
76{
77public:
79 void PrintSelf(ostream& os, vtkIndent indent) override;
80
85 static vtkClipVolume* New();
86
88
93 vtkSetMacro(Value, double);
94 vtkGetMacro(Value, double);
96
98
105 vtkSetMacro(InsideOut, vtkTypeBool);
106 vtkGetMacro(InsideOut, vtkTypeBool);
107 vtkBooleanMacro(InsideOut, vtkTypeBool);
109
111
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
146
148
154 vtkSetMacro(Mixed3DCellGeneration, vtkTypeBool);
155 vtkGetMacro(Mixed3DCellGeneration, vtkTypeBool);
156 vtkBooleanMacro(Mixed3DCellGeneration, vtkTypeBool);
158
160
165 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
166 vtkGetMacro(MergeTolerance, double);
168
170
175 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
177
183
188
189protected:
191 ~vtkClipVolume() override;
192
194
196 int FillInputPortInformation(int port, vtkInformation* info) override;
197
198 void ClipTets(double value, vtkTetra* clipTetra, vtkDataArray* clipScalars,
199 vtkDataArray* cellScalars, vtkIdList* tetraIds, vtkPoints* tetraPts, vtkPointData* inPD,
200 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
201 vtkCellData* clippedCD, int insideOut);
202 void ClipVoxel(double value, vtkDataArray* cellScalars, int flip, double origin[3],
203 double spacing[3], vtkIdList* cellIds, vtkPoints* cellPts, vtkPointData* inPD,
204 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
205 vtkCellData* clippedCD);
206
210 double Value;
216
217private:
218 vtkOrderedTriangulator* Triangulator;
219
220 // Used temporarily to pass data around
221 vtkIdType NumberOfCells;
222 vtkCellArray* Connectivity;
224 vtkIdType NumberOfClippedCells;
225 vtkCellArray* ClippedConnectivity;
226 vtkUnsignedCharArray* ClippedTypes;
227
228 vtkClipVolume(const vtkClipVolume&) = delete;
229 void operator=(const vtkClipVolume&) = delete;
230};
231
232VTK_ABI_NAMESPACE_END
233#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:31
abstract class to specify cell behavior
Definition vtkCell.h:50
clip volume data with user-specified implicit function or input scalar data
vtkUnstructuredGrid * ClippedOutput
void ClipTets(double value, vtkTetra *clipTetra, vtkDataArray *clipScalars, vtkDataArray *cellScalars, vtkIdList *tetraIds, vtkPoints *tetraPts, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD, vtkCellData *clippedCD, int insideOut)
vtkClipVolume(vtkImplicitFunction *cf=nullptr)
vtkTypeBool GenerateClipScalars
void ClipVoxel(double value, vtkDataArray *cellScalars, int flip, double origin[3], double spacing[3], vtkIdList *cellIds, vtkPoints *cellPts, vtkPointData *inPD, vtkPointData *outPD, vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD, vtkCellData *clippedCD)
vtkTypeBool InsideOut
virtual void SetClipFunction(vtkImplicitFunction *)
Specify the implicit function with which to perform the clipping.
vtkTypeBool GenerateClippedOutput
vtkIncrementalPointLocator * Locator
vtkMTimeType GetMTime() override
Return the mtime also considering the locator and clip function.
static vtkClipVolume * New()
Construct with user-specified implicit function; InsideOut turned off; value set to 0....
vtkImplicitFunction * ClipFunction
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkClipVolume() override
void ReportReferences(vtkGarbageCollector *) override
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void CreateDefaultLocator()
Create default locator.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
double MergeTolerance
vtkTypeBool Mixed3DCellGeneration
void SetLocator(vtkIncrementalPointLocator *locator)
Set / Get a spatial locator for merging points.
vtkUnstructuredGrid * GetClippedOutput()
Return the clipped output.
abstract superclass for arrays of numeric data
Detect and break reference loops.
list of point or cell ids
Definition vtkIdList.h:23
dynamic, self-adjusting array of vtkIdType
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.
merge exactly coincident points
helper class to generate triangulations
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:29
a 3D cell that represents a tetrahedron
Definition vtkTetra.h:34
dynamic, self-adjusting array of unsigned char
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270