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 =========================================================================*/
61 #ifndef vtkClipVolume_h
62 #define vtkClipVolume_h
63 
64 #include "vtkFiltersGeneralModule.h" // For export macro
66 
67 class vtkCellData;
68 class vtkDataArray;
69 class vtkIdList;
71 class vtkMergePoints;
73 class vtkPointData;
75 class vtkPoints;
77 class vtkCell;
78 class vtkTetra;
79 class vtkCellArray;
80 class vtkIdTypeArray;
82 
83 class VTKFILTERSGENERAL_EXPORT vtkClipVolume : public vtkUnstructuredGridAlgorithm
84 {
85 public:
87  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
88 
93  static vtkClipVolume *New();
94 
96 
101  vtkSetMacro(Value,double);
102  vtkGetMacro(Value,double);
104 
106 
113  vtkSetMacro(InsideOut,int);
114  vtkGetMacro(InsideOut,int);
115  vtkBooleanMacro(InsideOut,int);
117 
119 
124  virtual void SetClipFunction(vtkImplicitFunction*);
125  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
127 
129 
135  vtkSetMacro(GenerateClipScalars,int);
136  vtkGetMacro(GenerateClipScalars,int);
137  vtkBooleanMacro(GenerateClipScalars,int);
139 
141 
145  vtkSetMacro(GenerateClippedOutput,int);
146  vtkGetMacro(GenerateClippedOutput,int);
147  vtkBooleanMacro(GenerateClippedOutput,int);
149 
153  vtkUnstructuredGrid *GetClippedOutput();
154 
156 
162  vtkSetMacro(Mixed3DCellGeneration,int);
163  vtkGetMacro(Mixed3DCellGeneration,int);
164  vtkBooleanMacro(Mixed3DCellGeneration,int);
166 
168 
173  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
174  vtkGetMacro(MergeTolerance,double);
176 
178 
182  void SetLocator(vtkIncrementalPointLocator *locator);
183  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
185 
190  void CreateDefaultLocator();
191 
195  vtkMTimeType GetMTime() VTK_OVERRIDE;
196 
197 protected:
199  ~vtkClipVolume() VTK_OVERRIDE;
200 
201  void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
202 
203  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
204  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
205 
206  void ClipTets(double value, vtkTetra *clipTetra, vtkDataArray *clipScalars,
207  vtkDataArray *cellScalars, vtkIdList *tetraIds,
208  vtkPoints *tetraPts, vtkPointData *inPD, vtkPointData *outPD,
209  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
210  vtkCellData *clippedCD, int insideOut);
211  void ClipVoxel(double value, vtkDataArray *cellScalars, int flip,
212  double origin[3], double spacing[3], vtkIdList *cellIds,
213  vtkPoints *cellPts, vtkPointData *inPD, vtkPointData *outPD,
214  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
215  vtkCellData *clippedCD);
216 
217  vtkImplicitFunction *ClipFunction;
219  int InsideOut;
220  double Value;
221  int GenerateClipScalars;
222  double MergeTolerance;
223  int Mixed3DCellGeneration;
224  int GenerateClippedOutput;
225  vtkUnstructuredGrid *ClippedOutput;
226 
227 private:
228  vtkOrderedTriangulator *Triangulator;
229 
230  // Used temporarily to pass data around
231  vtkIdType NumberOfCells;
232  vtkCellArray *Connectivity;
233  vtkUnsignedCharArray *Types;
234  vtkIdTypeArray *Locations;
235  vtkIdType NumberOfClippedCells;
236  vtkCellArray *ClippedConnectivity;
237  vtkUnsignedCharArray *ClippedTypes;
238  vtkIdTypeArray *ClippedLocations;
239 
240 private:
241  vtkClipVolume(const vtkClipVolume&) VTK_DELETE_FUNCTION;
242  void operator=(const vtkClipVolume&) VTK_DELETE_FUNCTION;
243 };
244 
245 #endif
abstract interface for implicit functions
clip volume data with user-specified implicit function or input scalar data
Definition: vtkClipVolume.h:83
represent and manipulate point attribute data
Definition: vtkPointData.h:31
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
helper class to generate triangulations
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:345
Detect and break reference loops.
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:41
abstract class to specify cell behavior
Definition: vtkCell.h:56
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:33
merge exactly coincident points
list of point or cell ids
Definition: vtkIdList.h:30
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Superclass for algorithms that produce only unstructured grid as output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
object to represent cell connectivity
Definition: vtkCellArray.h:44
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:33