00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkStructuredData_h
00027 #define __vtkStructuredData_h
00028
00029 #include "vtkObject.h"
00030
00031 class vtkIdList;
00032
00033 #define VTK_UNCHANGED 0
00034 #define VTK_SINGLE_POINT 1
00035 #define VTK_X_LINE 2
00036 #define VTK_Y_LINE 3
00037 #define VTK_Z_LINE 4
00038 #define VTK_XY_PLANE 5
00039 #define VTK_YZ_PLANE 6
00040 #define VTK_XZ_PLANE 7
00041 #define VTK_XYZ_GRID 8
00042 #define VTK_EMPTY 9
00043
00044 class VTK_COMMON_EXPORT vtkStructuredData : public vtkObject
00045 {
00046 public:
00047 vtkTypeRevisionMacro(vtkStructuredData,vtkObject);
00048
00050
00055 static int SetDimensions(int inDim[3], int dim[3]);
00056 static int SetExtent(int inExt[6], int ext[6]);
00058
00060 static int GetDataDimension(int dataDescription);
00061
00063
00064 static void GetCellPoints(vtkIdType cellId, vtkIdList *ptIds,
00065 int dataDescription, int dim[3]);
00067
00069 static void GetPointCells(vtkIdType ptId, vtkIdList *cellIds, int dim[3]);
00070
00072
00074 static void GetCellNeighbors(vtkIdType cellId, vtkIdList *ptIds,
00075 vtkIdList *cellIds, int dim[3]);
00077
00079
00081 static vtkIdType ComputePointId(int dim[3], int ijk[3]) {
00082 return (ijk[2]*static_cast<vtkIdType>(dim[1]) + ijk[1])*dim[0] + ijk[0];}
00084
00086
00088 static vtkIdType ComputeCellId(int dim[3], int ijk[3]) {
00089 return (ijk[2]*static_cast<vtkIdType>(dim[1]-1) + ijk[1])*(dim[0]-1) + ijk[0];}
00091
00092 protected:
00093 vtkStructuredData() {};
00094 ~vtkStructuredData() {};
00095
00096 private:
00097 vtkStructuredData(const vtkStructuredData&);
00098 void operator=(const vtkStructuredData&);
00099 };
00100
00101
00102 #endif
00103