VTK
vtkRectilinearGridToTetrahedra.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRectilinearGridToTetrahedra.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 =========================================================================*/
48 #ifndef __vtkRectilinearGridToTetrahedra_h
49 #define __vtkRectilinearGridToTetrahedra_h
50 
51 // ways to create the mesh from voxels
52 #define VTK_VOXEL_TO_12_TET 12
53 #define VTK_VOXEL_TO_5_TET 5
54 #define VTK_VOXEL_TO_6_TET 6
55 #define VTK_VOXEL_TO_5_AND_12_TET -1
56 
58 class vtkRectilinearGrid;
59 class vtkSignedCharArray;
60 class vtkIdList;
61 class vtkCellArray;
62 class vtkPoints;
63 
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent);
69 
72 
74 
76  void SetTetraPerCellTo5() {SetTetraPerCell(VTK_VOXEL_TO_5_TET);};
77  void SetTetraPerCellTo6() {SetTetraPerCell(VTK_VOXEL_TO_6_TET);};
78  void SetTetraPerCellTo12() {SetTetraPerCell(VTK_VOXEL_TO_12_TET);};
80  vtkSetMacro(TetraPerCell,int);
81  vtkGetMacro(TetraPerCell,int);
83 
85 
87  vtkSetMacro(RememberVoxelId,int);
88  vtkGetMacro(RememberVoxelId,int);
89  vtkBooleanMacro(RememberVoxelId,int);
91 
93 
98  void SetInput(const double Extent[3], const double Spacing[3],
99  const double tol=0.001);
100  // Description:
101  // This version of the function for the wrappers
102  void SetInput(const double ExtentX,
103  const double ExtentY,
104  const double ExtentZ,
105  const double SpacingX,
106  const double SpacingY,
107  const double SpacingZ,
108  const double tol=0.001);
110 
111 protected:
114 
116 
119 
120  virtual int FillInputPortInformation(int, vtkInformation*);
121 
122  private:
124 
125  void operator=(const vtkRectilinearGridToTetrahedra&); // Not implemented.
126 
127 //BTX
129 
132  static void DetermineGridDivisionTypes(vtkRectilinearGrid *RectGrid,
133  vtkSignedCharArray *VoxelSubdivisionType,
134  const int &TetraPerCell);
136 
138 
139  static void GridToTetMesh(vtkRectilinearGrid *RectGrid,
140  vtkSignedCharArray *VoxelSubdivisionType,
141  const int &TetraPerCell,
142  const int &RememberVoxelId,
143  vtkUnstructuredGrid *TetMesh);
145 
147 
151  static int TetrahedralizeVoxel(vtkIdList *VoxelCorners,
152  const int &DivisionType,
153  vtkPoints *NodeList,
154  vtkCellArray *TetList);
156 
158 
160  static inline void TetrahedralizeAddCenterPoint(vtkIdList *VoxelCorners,
161  vtkPoints *NodeList);
162 //ETX
163 };
165 
166 #endif /* __vtkRectilinearGridToTetrahedra_h */
167 
#define VTK_VOXEL_TO_6_TET
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_GRAPHICS_EXPORT
Store vtkAlgorithm input/output information.
static vtkUnstructuredGridAlgorithm * New()
virtual int FillInputPortInformation(int port, vtkInformation *info)
void SetInput(vtkDataObject *)
create a Tetrahedral mesh from a RectilinearGrid
a simple class to control print indentation
Definition: vtkIndent.h:37
list of point or cell ids
Definition: vtkIdList.h:34
dataset represents arbitrary combinations of all possible cell types
void PrintSelf(ostream &os, vtkIndent indent)
dynamic, self-adjusting array of signed char
#define VTK_VOXEL_TO_12_TET
Superclass for algorithms that produce only unstructured grid as output.
#define VTK_VOXEL_TO_5_AND_12_TET
object to represent cell connectivity
Definition: vtkCellArray.h:48
#define VTK_VOXEL_TO_5_TET
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38