31 #ifndef vtkStructuredData_h
32 #define vtkStructuredData_h
39 #define VTK_UNCHANGED 0
40 #define VTK_SINGLE_POINT 1
44 #define VTK_XY_PLANE 5
45 #define VTK_YZ_PLANE 6
46 #define VTK_XZ_PLANE 7
47 #define VTK_XYZ_GRID 8
61 static int SetDimensions(
int inDim[3],
int dim[3]);
62 static int SetExtent(
int inExt[6],
int ext[6]);
68 static int GetDataDescription(
int dims[3]);
69 static int GetDataDescriptionFromExtent(
int ext[6] );
74 static int GetDataDimension(
int dataDescription);
75 static int GetDataDimension(
int ext[6] );
90 static void GetCellExtentFromPointExtent(
91 int pntExtent[6],
int cellExtent[6],
int dataDescription=
VTK_EMPTY );
97 static void GetDimensionsFromExtent(
98 int ext[6],
int dims[3],
int dataDescription=
VTK_EMPTY );
105 static void GetCellDimensionsFromExtent(
106 int ext[6],
int celldims[3],
int dataDescription=
VTK_EMPTY );
113 static void GetCellDimensionsFromPointDimensions(
114 int pntdims[3],
int cellDims[3] );
122 static void GetLocalStructuredCoordinates(
123 int ijk[3],
int ext[6],
int lijk[3],
int dataDescription=
VTK_EMPTY );
130 static void GetGlobalStructuredCoordinates(
131 int lijk[3],
int ext[6],
int ijk[3],
int dataDescription=
VTK_EMPTY );
137 int dataDescription,
int dim[3]);
172 int dim[3],
int ijk[3],
int dataDescription=
VTK_EMPTY );
181 int dim[3],
int ijk[3],
int dataDescription=
VTK_EMPTY );
189 static void ComputeCellStructuredCoordsForExtent(
190 const vtkIdType cellIdx,
int ext[6],
int ijk[3],
198 static void ComputeCellStructuredCoords(
199 const vtkIdType cellId,
int dim[3],
int ijk[3],
207 static void ComputePointStructuredCoordsForExtent(
208 const vtkIdType ptId,
int ext[6],
int ijk[3],
216 static void ComputePointStructuredCoords(
217 const vtkIdType ptId,
int dim[3],
int ijk[3],
232 const int i,
const int j,
const int k,
const int N1,
const int N2 )
234 return( (static_cast<vtkIdType>(k)*N2+j)*N1+i );
244 const vtkIdType idx,
const int N1,
const int N2,
int &i,
int &j,
int &k )
254 template <
typename T>
255 static T
Max(
const T &a,
const T &b)
257 return (a > b) ? a : b;
267 int ext[6],
int celldims[3],
int)
285 ijk[0], ijk[1], ijk[2],
293 return static_cast<vtkIdType>(ext[1] - ext[0] + 1) *
294 static_cast<vtkIdType>(ext[3] - ext[2] + 1) *
295 static_cast<vtkIdType>(ext[5] - ext[4] + 1);
311 return static_cast<vtkIdType>(cellDims[0]) *
312 static_cast<vtkIdType>(cellDims[1]) *
318 int nodeExtent[6],
int cellExtent[6],
int)
320 cellExtent[0] = nodeExtent[0];
321 cellExtent[2] = nodeExtent[2];
322 cellExtent[4] = nodeExtent[4];
333 dims[0] = ext[1] - ext[0] + 1;
334 dims[1] = ext[3] - ext[2] + 1;
335 dims[2] = ext[5] - ext[4] + 1;
340 int nodeDims[3],
int cellDims[3])
349 int ijk[3],
int ext[6],
int lijk[3],
int)
351 lijk[0] = ijk[0] - ext[0];
352 lijk[1] = ijk[1] - ext[2];
353 lijk[2] = ijk[2] - ext[4];
358 int lijk[3],
int ext[6],
int ijk[3],
int)
360 ijk[0] = ext[0] + lijk[0];
361 ijk[1] = ext[2] + lijk[1];
362 ijk[2] = ext[4] + lijk[2];
367 int extent[6],
int ijk[3],
int)
380 int extent[6],
int ijk[3],
int)
393 const vtkIdType cellId,
int dims[3],
int ijk[3],
int)
396 dims[0] - 1, dims[1] - 1,
397 ijk[0], ijk[1], ijk[2]);
402 const vtkIdType cellIdx,
int ext[6],
int ijk[3],
int)
415 const vtkIdType ptId,
int dim[3],
int ijk[3],
int)
418 ijk[0], ijk[1], ijk[2]);
423 const vtkIdType ptId,
int ext[6],
int ijk[3],
int)
static vtkIdType GetNumberOfCells(int ext[6], int dataDescription=VTK_EMPTY)
static void ComputePointStructuredCoordsForExtent(const vtkIdType ptId, int ext[6], int ijk[3], int dataDescription=VTK_EMPTY)
Singleton class for topologically regular data.
abstract base class for most VTK objects
static T Max(const T &a, const T &b)
static vtkIdType ComputePointId(int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
static void GetGlobalStructuredCoordinates(int lijk[3], int ext[6], int ijk[3], int dataDescription=VTK_EMPTY)
static void GetCellDimensionsFromExtent(int ext[6], int celldims[3], int dataDescription=VTK_EMPTY)
static vtkIdType GetLinearIndex(const int i, const int j, const int k, const int N1, const int N2)
static void GetDimensionsFromExtent(int ext[6], int dims[3], int dataDescription=VTK_EMPTY)
static vtkIdType ComputeCellIdForExtent(int extent[6], int ijk[3], int dataDescription=VTK_EMPTY)
list of point or cell ids
static void GetLocalStructuredCoordinates(int ijk[3], int ext[6], int lijk[3], int dataDescription=VTK_EMPTY)
static void ComputeCellStructuredCoordsForExtent(const vtkIdType cellIdx, int ext[6], int ijk[3], int dataDescription=VTK_EMPTY)
static void GetCellDimensionsFromPointDimensions(int pntdims[3], int cellDims[3])
static vtkIdType ComputeCellId(int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
static vtkIdType ComputePointIdForExtent(int extent[6], int ijk[3], int dataDescription=VTK_EMPTY)
static void ComputeCellStructuredCoords(const vtkIdType cellId, int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
static void ComputePointStructuredCoords(const vtkIdType ptId, int dim[3], int ijk[3], int dataDescription=VTK_EMPTY)
static void GetStructuredCoordinates(const vtkIdType idx, const int N1, const int N2, int &i, int &j, int &k)
static vtkIdType GetNumberOfPoints(int ext[6], int dataDescription=VTK_EMPTY)
static void GetCellExtentFromPointExtent(int pntExtent[6], int cellExtent[6], int dataDescription=VTK_EMPTY)
#define VTKCOMMONDATAMODEL_EXPORT