VTK
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=========================================================================*/
64#ifndef vtkClipVolume_h
65#define vtkClipVolume_h
66
67#include "vtkFiltersGeneralModule.h" // For export macro
69
70class vtkCellData;
71class vtkDataArray;
72class vtkIdList;
74class vtkMergePoints;
76class vtkPointData;
78class vtkPoints;
80class vtkCell;
81class vtkTetra;
82class vtkCellArray;
83class vtkIdTypeArray;
85
86class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
87{
88public:
90 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
91
96 static vtkClipVolume *New();
97
99
104 vtkSetMacro(Value,double);
105 vtkGetMacro(Value,double);
107
109
116 vtkSetMacro(InsideOut,int);
117 vtkGetMacro(InsideOut,int);
118 vtkBooleanMacro(InsideOut,int);
120
122
128 vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
130
132
138 vtkSetMacro(GenerateClipScalars,int);
139 vtkGetMacro(GenerateClipScalars,int);
140 vtkBooleanMacro(GenerateClipScalars,int);
142
144
148 vtkSetMacro(GenerateClippedOutput,int);
149 vtkGetMacro(GenerateClippedOutput,int);
150 vtkBooleanMacro(GenerateClippedOutput,int);
152
157
159
165 vtkSetMacro(Mixed3DCellGeneration,int);
166 vtkGetMacro(Mixed3DCellGeneration,int);
167 vtkBooleanMacro(Mixed3DCellGeneration,int);
169
171
176 vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
177 vtkGetMacro(MergeTolerance,double);
179
181
186 vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
188
194
198 vtkMTimeType GetMTime() VTK_OVERRIDE;
199
200protected:
202 ~vtkClipVolume() VTK_OVERRIDE;
203
204 void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
205
206 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
207 int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
208
209 void ClipTets(double value, vtkTetra *clipTetra, vtkDataArray *clipScalars,
210 vtkDataArray *cellScalars, vtkIdList *tetraIds,
211 vtkPoints *tetraPts, vtkPointData *inPD, vtkPointData *outPD,
212 vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
213 vtkCellData *clippedCD, int insideOut);
214 void ClipVoxel(double value, vtkDataArray *cellScalars, int flip,
215 double origin[3], double spacing[3], vtkIdList *cellIds,
216 vtkPoints *cellPts, vtkPointData *inPD, vtkPointData *outPD,
217 vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
218 vtkCellData *clippedCD);
219
220 vtkImplicitFunction *ClipFunction;
222 int InsideOut;
223 double Value;
224 int GenerateClipScalars;
225 double MergeTolerance;
226 int Mixed3DCellGeneration;
227 int GenerateClippedOutput;
228 vtkUnstructuredGrid *ClippedOutput;
229
230private:
231 vtkOrderedTriangulator *Triangulator;
232
233 // Used temporarily to pass data around
234 vtkIdType NumberOfCells;
235 vtkCellArray *Connectivity;
237 vtkIdTypeArray *Locations;
238 vtkIdType NumberOfClippedCells;
239 vtkCellArray *ClippedConnectivity;
240 vtkUnsignedCharArray *ClippedTypes;
241 vtkIdTypeArray *ClippedLocations;
242
243private:
244 vtkClipVolume(const vtkClipVolume&) VTK_DELETE_FUNCTION;
245 void operator=(const vtkClipVolume&) VTK_DELETE_FUNCTION;
246};
247
248#endif
object to represent cell connectivity
Definition: vtkCellArray.h:51
represent and manipulate cell attribute data
Definition: vtkCellData.h:39
abstract class to specify cell behavior
Definition: vtkCell.h:60
clip volume data with user-specified implicit function or input scalar data
Definition: vtkClipVolume.h:87
virtual void SetClipFunction(vtkImplicitFunction *)
Specify the implicit function with which to perform the clipping.
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....
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CreateDefaultLocator()
Create default locator.
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:55
Detect and break reference loops.
list of point or cell ids
Definition: vtkIdList.h:37
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:40
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:38
represent and manipulate 3D points
Definition: vtkPoints.h:40
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:48
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:376
@ value
Definition: vtkX3D.h:220
@ port
Definition: vtkX3D.h:447
@ spacing
Definition: vtkX3D.h:481
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248