This module reads in 3D scalar or vector data from a binary file in a simple format and outputs a 3D uniform lattice. The 3D binary file format consists of:

nx, ny, nz, veclen, x0, y0, z0, dx, dy, dz, data.

Here nx, x0 and dx are respectively the number of points, the origin and the grid spacing in the x direction (and similarly for the y and z directions). veclen is the number of data values at each location in the array. Finally, data is the array of values, ordered with the values at each location varying fastest, then x, then y, then z. In this list, nx, ny, nz and veclen are of type short, while the rest of the items are of type float.

The mapping between the file variables and the components of the output lattice is as follows (this can be seen by using DataScribe to view the structure of the module):

nx -> dims[0];
ny -> dims[1];
nz -> dims[2];
x0 -> bBox[0];   x0 + (nx-1)*dx -> bBox[1];
y0 -> bBox[2];   y0 + (ny-1)*dy -> bBox[3];
z0 -> bBox[4];   z0 + (nz-1)*dz -> bBox[5];
veclen -> nDataVar;
data -> values;



Port: 3Dfile
Type: Text
Input filename. The name may be entered into the text type-in slot, or via the file browser (obtained using the File item on the menu bar).

Port: Script File
Type: Text


Port: Lattice
Type: Lattice
Constraints: 3-D
Constraints: float
Constraints: uniform
Output data - 3D uniform float lattice.




The program ${EXPLORERHOME}/data/src/Make3D.c on UNIX systems or %EXPLORERHOME%\data\src\Make3D.c on NT systems, shows how this file format could be used for the output of a simple program.

Read2Da uses a similar format to read in 2D scalar or vector data from ascii files.

[Documentation Home]
© The Numerical Algorithms Group Ltd, Oxford UK. 2000