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=========================================================================*/
80#ifndef vtkClipVolume_h
81#define vtkClipVolume_h
82
83#include "vtkFiltersGeneralModule.h" // For export macro
85
86class vtkCellData;
87class vtkDataArray;
88class vtkIdList;
90class vtkMergePoints;
92class vtkPointData;
94class vtkPoints;
96class vtkCell;
97class vtkTetra;
98class vtkCellArray;
99class vtkIdTypeArray;
101
102class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
103{
104public:
106 void PrintSelf(ostream& os, vtkIndent indent) override;
107
113
115
120 vtkSetMacro(Value, double);
121 vtkGetMacro(Value, double);
123
125
132 vtkSetMacro(InsideOut, vtkTypeBool);
133 vtkGetMacro(InsideOut, vtkTypeBool);
134 vtkBooleanMacro(InsideOut, vtkTypeBool);
136
138
144 vtkGetObjectMacro(ClipFunction, vtkImplicitFunction);
146
148
154 vtkSetMacro(GenerateClipScalars, vtkTypeBool);
155 vtkGetMacro(GenerateClipScalars, vtkTypeBool);
156 vtkBooleanMacro(GenerateClipScalars, vtkTypeBool);
158
160
164 vtkSetMacro(GenerateClippedOutput, vtkTypeBool);
165 vtkGetMacro(GenerateClippedOutput, vtkTypeBool);
166 vtkBooleanMacro(GenerateClippedOutput, vtkTypeBool);
168
173
175
181 vtkSetMacro(Mixed3DCellGeneration, vtkTypeBool);
182 vtkGetMacro(Mixed3DCellGeneration, vtkTypeBool);
183 vtkBooleanMacro(Mixed3DCellGeneration, vtkTypeBool);
185
187
192 vtkSetClampMacro(MergeTolerance, double, 0.0001, 0.25);
193 vtkGetMacro(MergeTolerance, double);
195
197
202 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
204
210
215
216protected:
218 ~vtkClipVolume() override;
219
221
223 int FillInputPortInformation(int port, vtkInformation* info) override;
224
225 void ClipTets(double value, vtkTetra* clipTetra, vtkDataArray* clipScalars,
226 vtkDataArray* cellScalars, vtkIdList* tetraIds, vtkPoints* tetraPts, vtkPointData* inPD,
227 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
228 vtkCellData* clippedCD, int insideOut);
229 void ClipVoxel(double value, vtkDataArray* cellScalars, int flip, double origin[3],
230 double spacing[3], vtkIdList* cellIds, vtkPoints* cellPts, vtkPointData* inPD,
231 vtkPointData* outPD, vtkCellData* inCD, vtkIdType cellId, vtkCellData* outCD,
232 vtkCellData* clippedCD);
233
237 double Value;
243
244private:
245 vtkOrderedTriangulator* Triangulator;
246
247 // Used temporarily to pass data around
248 vtkIdType NumberOfCells;
249 vtkCellArray* Connectivity;
251 vtkIdType NumberOfClippedCells;
252 vtkCellArray* ClippedConnectivity;
253 vtkUnsignedCharArray* ClippedTypes;
254
255private:
256 vtkClipVolume(const vtkClipVolume&) = delete;
257 void operator=(const vtkClipVolume&) = delete;
258};
259
260#endif
object to represent cell connectivity
Definition: vtkCellArray.h:290
represent and manipulate cell attribute data
Definition: vtkCellData.h:142
abstract class to specify cell behavior
Definition: vtkCell.h:147
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
Definition: vtkDataArray.h:159
Detect and break reference loops.
list of point or cell ids
Definition: vtkIdList.h:140
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:113
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:142
represent and manipulate 3D points
Definition: vtkPoints.h:143
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:111
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:69
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287