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 
66 #include "vtkFiltersGeneralModule.h" // For export macro
68 
69 class vtkCellData;
70 class vtkDataArray;
71 class vtkIdList;
73 class vtkMergePoints;
75 class vtkPointData;
77 class vtkPoints;
79 class vtkCell;
80 class vtkTetra;
81 class vtkCellArray;
82 class vtkIdTypeArray;
84 
86 {
87 public:
89  void PrintSelf(ostream& os, vtkIndent indent);
90 
93  static vtkClipVolume *New();
94 
96 
99  vtkSetMacro(Value,double);
100  vtkGetMacro(Value,double);
102 
104 
109  vtkSetMacro(InsideOut,int);
110  vtkGetMacro(InsideOut,int);
111  vtkBooleanMacro(InsideOut,int);
113 
115 
118  virtual void SetClipFunction(vtkImplicitFunction*);
119  vtkGetObjectMacro(ClipFunction,vtkImplicitFunction);
121 
123 
127  vtkSetMacro(GenerateClipScalars,int);
128  vtkGetMacro(GenerateClipScalars,int);
129  vtkBooleanMacro(GenerateClipScalars,int);
131 
133 
135  vtkSetMacro(GenerateClippedOutput,int);
136  vtkGetMacro(GenerateClippedOutput,int);
137  vtkBooleanMacro(GenerateClippedOutput,int);
139 
141  vtkUnstructuredGrid *GetClippedOutput();
142 
144 
148  vtkSetMacro(Mixed3DCellGeneration,int);
149  vtkGetMacro(Mixed3DCellGeneration,int);
150  vtkBooleanMacro(Mixed3DCellGeneration,int);
152 
154 
157  vtkSetClampMacro(MergeTolerance,double,0.0001,0.25);
158  vtkGetMacro(MergeTolerance,double);
160 
162 
164  void SetLocator(vtkIncrementalPointLocator *locator);
165  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
167 
170  void CreateDefaultLocator();
171 
173  unsigned long int GetMTime();
174 
175 protected:
177  ~vtkClipVolume();
178 
179  virtual void ReportReferences(vtkGarbageCollector*);
180 
183 
184  void ClipTets(double value, vtkTetra *clipTetra, vtkDataArray *clipScalars,
185  vtkDataArray *cellScalars, vtkIdList *tetraIds,
186  vtkPoints *tetraPts, vtkPointData *inPD, vtkPointData *outPD,
187  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
188  vtkCellData *clippedCD, int insideOut);
189  void ClipVoxel(double value, vtkDataArray *cellScalars, int flip,
190  double origin[3], double spacing[3], vtkIdList *cellIds,
191  vtkPoints *cellPts, vtkPointData *inPD, vtkPointData *outPD,
192  vtkCellData *inCD, vtkIdType cellId, vtkCellData *outCD,
193  vtkCellData *clippedCD);
194 
198  double Value;
204 
205 private:
206  vtkOrderedTriangulator *Triangulator;
207 
208  // Used temporarily to pass data around
209  vtkIdType NumberOfCells;
210  vtkCellArray *Connectivity;
211  vtkUnsignedCharArray *Types;
212  vtkIdTypeArray *Locations;
213  vtkIdType NumberOfClippedCells;
214  vtkCellArray *ClippedConnectivity;
215  vtkUnsignedCharArray *ClippedTypes;
216  vtkIdTypeArray *ClippedLocations;
217 
218 private:
219  vtkClipVolume(const vtkClipVolume&); // Not implemented.
220  void operator=(const vtkClipVolume&); // Not implemented.
221 };
222 
223 #endif
abstract interface for implicit functions
clip volume data with user-specified implicit function or input scalar data
Definition: vtkClipVolume.h:85
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
represent and manipulate point attribute data
Definition: vtkPointData.h:36
Store vtkAlgorithm input/output information.
represent and manipulate cell attribute data
Definition: vtkCellData.h:37
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:275
int GenerateClippedOutput
Detect and break reference loops.
virtual void ReportReferences(vtkGarbageCollector *)
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:46
abstract class to specify cell behavior
Definition: vtkCell.h:61
double MergeTolerance
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIncrementalPointLocator * Locator
merge exactly coincident points
list of point or cell ids
Definition: vtkIdList.h:35
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
void PrintSelf(ostream &os, vtkIndent indent)
#define VTKFILTERSGENERAL_EXPORT
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:49
Store zero or more vtkInformation instances.
vtkImplicitFunction * ClipFunction
represent and manipulate 3D points
Definition: vtkPoints.h:38