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
61#ifndef vtkClipVolume_h
62#define vtkClipVolume_h
63
64#include "vtkFiltersGeneralModule.h" // For export macro
66
67VTK_ABI_NAMESPACE_BEGIN
68class vtkCellData;
69class vtkDataArray;
70class vtkIdList;
72class vtkMergePoints;
74class vtkPointData;
76class vtkPoints;
78class vtkCell;
79class vtkTetra;
80class vtkCellArray;
81class vtkIdTypeArray;
83
84class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
85{
86public:
88 void PrintSelf(ostream& os, vtkIndent indent) override;
89
94 static vtkClipVolume* New();
95
97
102 vtkSetMacro(Value, double);
103 vtkGetMacro(Value, double);
105
107
114 vtkSetMacro(InsideOut, vtkTypeBool);
115 vtkGetMacro(InsideOut, vtkTypeBool);
116 vtkBooleanMacro(InsideOut, vtkTypeBool);
118
120
126 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
128
130
136 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
137 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
138 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
140
142
146 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
147 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
148 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
150
155
157
163 vtkSetMacro(Mixed3DCellGeneration, vtkTypeBool);
164 vtkGetMacro(Mixed3DCellGeneration, vtkTypeBool);
165 vtkBooleanMacro(Mixed3DCellGeneration, vtkTypeBool);
167
169
174 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
175 vtkGetMacro(MergeTolerance, double);
177
179
184 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
186
192
197
198protected:
200 ~vtkClipVolume() override;
201
203
205 int FillInputPortInformation(int port, vtkInformation* info) override;
206
207 void ClipTets(double value, vtkTetra* clipTetra, vtkDataArray* clipScalars,
208 vtkDataArray* cellScalars, vtkIdList* tetraIds, vtkPoints* tetraPts, vtkPointData* inPD,
209 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
210 vtkCellData* clippedCD, int insideOut);
211 void ClipVoxel(double value, vtkDataArray* cellScalars, int flip, double origin[3],
212 double spacing[3], vtkIdList* cellIds, vtkPoints* cellPts, vtkPointData* inPD,
213 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
214 vtkCellData* clippedCD);
215
219 double Value;
225
226private:
227 vtkOrderedTriangulator* Triangulator;
228
229 // Used temporarily to pass data around
230 vtkIdType NumberOfCells;
231 vtkCellArray* Connectivity;
233 vtkIdType NumberOfClippedCells;
234 vtkCellArray* ClippedConnectivity;
235 vtkUnsignedCharArray* ClippedTypes;
236
237 vtkClipVolume(const vtkClipVolume&) = delete;
238 void operator=(const vtkClipVolume&) = delete;
239};
240
241VTK_ABI_NAMESPACE_END
242#endif
object to represent cell connectivity
represent and manipulate cell attribute data
Definition vtkCellData.h:40
abstract class to specify cell behavior
Definition vtkCell.h:59
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:32
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:38
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:38
a 3D cell that represents a tetrahedron
Definition vtkTetra.h:43
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