VTK  9.1.0
vtkClipVolume.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkClipVolume.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
70#ifndef vtkClipVolume_h
71#define vtkClipVolume_h
72
73#include "vtkFiltersGeneralModule.h" // For export macro
75
76class vtkCellData;
77class vtkDataArray;
78class vtkIdList;
80class vtkMergePoints;
82class vtkPointData;
84class vtkPoints;
86class vtkCell;
87class vtkTetra;
88class vtkCellArray;
89class vtkIdTypeArray;
91
92class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
93{
94public:
96 void PrintSelf(ostream& os, vtkIndent indent) override;
97
103
105
110 vtkSetMacro(Value, double);
111 vtkGetMacro(Value, double);
113
115
122 vtkSetMacro(InsideOut, vtkTypeBool);
123 vtkGetMacro(InsideOut, vtkTypeBool);
124 vtkBooleanMacro(InsideOut, vtkTypeBool);
126
128
134 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
136
138
144 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
145 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
146 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
148
150
154 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
155 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
156 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
158
163
165
171 vtkSetMacro(Mixed3DCellGeneration, vtkTypeBool);
172 vtkGetMacro(Mixed3DCellGeneration, vtkTypeBool);
173 vtkBooleanMacro(Mixed3DCellGeneration, vtkTypeBool);
175
177
182 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
183 vtkGetMacro(MergeTolerance, double);
185
187
192 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
194
200
205
206protected:
208 ~vtkClipVolume() override;
209
211
214
215 void ClipTets(double value, vtkTetra* clipTetra, vtkDataArray* clipScalars,
216 vtkDataArray* cellScalars, vtkIdList* tetraIds, vtkPoints* tetraPts, vtkPointData* inPD,
217 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
218 vtkCellData* clippedCD, int insideOut);
219 void ClipVoxel(double value, vtkDataArray* cellScalars, int flip, double origin[3],
220 double spacing[3], vtkIdList* cellIds, vtkPoints* cellPts, vtkPointData* inPD,
221 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
222 vtkCellData* clippedCD);
223
227 double Value;
233
234private:
235 vtkOrderedTriangulator* Triangulator;
236
237 // Used temporarily to pass data around
238 vtkIdType NumberOfCells;
239 vtkCellArray* Connectivity;
241 vtkIdType NumberOfClippedCells;
242 vtkCellArray* ClippedConnectivity;
243 vtkUnsignedCharArray* ClippedTypes;
244
245private:
246 vtkClipVolume(const vtkClipVolume&) = delete;
247 void operator=(const vtkClipVolume&) = delete;
248};
249
250#endif
object to represent cell connectivity
Definition: vtkCellArray.h:190
represent and manipulate cell attribute data
Definition: vtkCellData.h:42
abstract class to specify cell behavior
Definition: vtkCell.h:67
clip volume data with user-specified implicit function or input scalar data
Definition: vtkClipVolume.h:93
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
Definition: vtkDataArray.h:59
Detect and break reference loops.
list of point or cell ids
Definition: vtkIdList.h:40
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:43
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
Definition: vtkPointData.h:42
represent and manipulate 3D points
Definition: vtkPoints.h:43
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:51
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
@ info
Definition: vtkX3D.h:382
@ value
Definition: vtkX3D.h:226
@ port
Definition: vtkX3D.h:453
@ spacing
Definition: vtkX3D.h:487
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287