VTK  9.4.20250201
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
71#ifndef vtkClipVolume_h
72#define vtkClipVolume_h
73
74#include "vtkFiltersGeneralModule.h" // For export macro
76
77VTK_ABI_NAMESPACE_BEGIN
78class vtkCellData;
79class vtkDataArray;
80class vtkIdList;
82class vtkMergePoints;
84class vtkPointData;
86class vtkPoints;
88class vtkCell;
89class vtkTetra;
90class vtkCellArray;
91class vtkIdTypeArray;
93
94class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
95{
96public:
98 void PrintSelf(ostream& os, vtkIndent indent) override;
99
105
107
112 vtkSetMacro(Value, double);
113 vtkGetMacro(Value, double);
115
117
124 vtkSetMacro(InsideOut, vtkTypeBool);
125 vtkGetMacro(InsideOut, vtkTypeBool);
126 vtkBooleanMacro(InsideOut, vtkTypeBool);
128
130
136 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
138
140
146 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
147 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
148 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
150
152
156 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
157 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
158 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
160
165
167
173 vtkSetMacro(Mixed3DCellGeneration, vtkTypeBool);
174 vtkGetMacro(Mixed3DCellGeneration, vtkTypeBool);
175 vtkBooleanMacro(Mixed3DCellGeneration, vtkTypeBool);
177
179
184 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
185 vtkGetMacro(MergeTolerance, double);
187
189
194 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
196
202
207
208protected:
210 ~vtkClipVolume() override;
211
213
215 int FillInputPortInformation(int port, vtkInformation* info) override;
216
217 void ClipTets(double value, vtkTetra* clipTetra, vtkDataArray* clipScalars,
218 vtkDataArray* cellScalars, vtkIdList* tetraIds, vtkPoints* tetraPts, vtkPointData* inPD,
219 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
220 vtkCellData* clippedCD, int insideOut);
221 void ClipVoxel(double value, vtkDataArray* cellScalars, int flip, double origin[3],
222 double spacing[3], vtkIdList* cellIds, vtkPoints* cellPts, vtkPointData* inPD,
223 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
224 vtkCellData* clippedCD);
225
229 double Value;
235
236private:
237 vtkOrderedTriangulator* Triangulator;
238
239 // Used temporarily to pass data around
240 vtkIdType NumberOfCells;
241 vtkCellArray* Connectivity;
243 vtkIdType NumberOfClippedCells;
244 vtkCellArray* ClippedConnectivity;
245 vtkUnsignedCharArray* ClippedTypes;
246
247 vtkClipVolume(const vtkClipVolume&) = delete;
248 void operator=(const vtkClipVolume&) = delete;
249};
250
251VTK_ABI_NAMESPACE_END
252#endif
object to represent cell connectivity
represent and manipulate cell attribute data
abstract class to specify cell behavior
Definition vtkCell.h:130
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:133
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:108
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:139
a 3D cell that represents a tetrahedron
Definition vtkTetra.h:113
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