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 =========================================================================*/
63 #ifndef __vtkClipVolume_h
64 #define __vtkClipVolume_h
65 
67 
68 class vtkCellData;
69 class vtkDataArray;
70 class vtkIdList;
72 class vtkMergePoints;
74 class vtkPointData;
76 class vtkPoints;
78 class vtkCell;
79 class vtkTetra;
80 class vtkCellArray;
81 class vtkIdTypeArray;
83 
85 {
86 public:
88  void PrintSelf(ostream& os, vtkIndent indent);
89 
92  static vtkClipVolume *New();
93 
95 
98  vtkSetMacro(Value,double);
99  vtkGetMacro(Value,double);
101 
103 
108  vtkSetMacro(InsideOut,int);
109  vtkGetMacro(InsideOut,int);
110  vtkBooleanMacro(InsideOut,int);
112 
114 
117  virtual void SetClipFunction(vtkImplicitFunction*);
118  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
120 
122 
126  vtkSetMacro(GenerateClipScalars,int);
127  vtkGetMacro(GenerateClipScalars,int);
128  vtkBooleanMacro(GenerateClipScalars,int);
130 
132 
134  vtkSetMacro(GenerateClippedOutput,int);
135  vtkGetMacro(GenerateClippedOutput,int);
136  vtkBooleanMacro(GenerateClippedOutput,int);
138 
140  vtkUnstructuredGrid *GetClippedOutput();
141 
143 
147  vtkSetMacro(Mixed3DCellGeneration,int);
148  vtkGetMacro(Mixed3DCellGeneration,int);
149  vtkBooleanMacro(Mixed3DCellGeneration,int);
151 
153 
156  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
157  vtkGetMacro(MergeTolerance,double);
159 
161 
163  void SetLocator(vtkIncrementalPointLocator *locator);
164  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
166 
169  void CreateDefaultLocator();
170 
172  unsigned long int GetMTime();
173 
174 protected:
176  ~vtkClipVolume();
177 
178  virtual void ReportReferences(vtkGarbageCollector*);
179 
182 
183  void ClipTets(double value, vtkTetra *clipTetra, vtkDataArray *clipScalars,
184  vtkDataArray *cellScalars, vtkIdList *tetraIds,
185  vtkPoints *tetraPts, vtkPointData *inPD, vtkPointData *outPD,
186  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
187  vtkCellData *clippedCD, int insideOut);
188  void ClipVoxel(double value, vtkDataArray *cellScalars, int flip,
189  double origin[3], double spacing[3], vtkIdList *cellIds,
190  vtkPoints *cellPts, vtkPointData *inPD, vtkPointData *outPD,
191  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
192  vtkCellData *clippedCD);
193 
197  double Value;
203 
204 private:
205  vtkOrderedTriangulator *Triangulator;
206 
207  // Used temporarily to pass data around
208  vtkIdType NumberOfCells;
209  vtkCellArray *Connectivity;
210  vtkUnsignedCharArray *Types;
211  vtkIdTypeArray *Locations;
212  vtkIdType NumberOfClippedCells;
213  vtkCellArray *ClippedConnectivity;
214  vtkUnsignedCharArray *ClippedTypes;
215  vtkIdTypeArray *ClippedLocations;
216 
217 private:
218  vtkClipVolume(const vtkClipVolume&); // Not implemented.
219  void operator=(const vtkClipVolume&); // Not implemented.
220 };
221 
222 #endif
abstract interface for implicit functions
clip volume data with user-specified implicit function or input scalar data
Definition: vtkClipVolume.h:84
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_GRAPHICS_EXPORT
represent and manipulate point attribute data
Definition: vtkPointData.h:35
Store vtkAlgorithm input/output information.
represent and manipulate cell attribute data
Definition: vtkCellData.h:36
static vtkUnstructuredGridAlgorithm * New()
Abstract class in support of both point location and point insertion.
helper class to generate triangulations
int Mixed3DCellGeneration
virtual int FillInputPortInformation(int port, vtkInformation *info)
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:255
int GenerateClippedOutput
Detect and break reference loops.
virtual void ReportReferences(vtkGarbageCollector *)
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:45
abstract class to specify cell behavior
Definition: vtkCell.h:57
double MergeTolerance
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkIncrementalPointLocator * Locator
merge exactly coincident points
list of point or cell ids
Definition: vtkIdList.h:34
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only unstructured grid as output.
dynamic, self-adjusting array of unsigned char
vtkUnstructuredGrid * ClippedOutput
object to represent cell connectivity
Definition: vtkCellArray.h:48
Store zero or more vtkInformation instances.
vtkImplicitFunction * ClipFunction
represent and manipulate 3D points
Definition: vtkPoints.h:38