This table describes the shortest and simplest native Space file byte structure (Space Volume Type 1), which is characteristic of all Space file types and which all Space versions can read. It consists of a 10000 byte header containing a volume/file description followed by uncompressed volume data.
This file type does not include specification of a coordinate system origin . Space uses the center of the volume for this file type.
The Matlab program write_Space_volume.m
will write a 3-D Matlab array to a file of this type.
| Contents | Data type | Number | Length, bytes | Byte offset from beginning of file | Comments |
| Little-endian byte ordering is assumed. | |||||
| The text "mdvol" | char, 1 byte | 5 | 5 | 0 | Identifier for any Space file type. |
| The text "1" | char, 1 byte | 1 | 1 | 5 | Space Volume Type file version indicator. |
| 10000 | unsigned int, 4 bytes | 1 | 4 | 6 | Length of header, for a Space Volume Type 1 file. |
| Volume dimensions: xzy (in pixels) | unsigned int, 4 bytes | 3 | 12 | 10 | Must correspond with the number of image values (see last row of this table). |
| Physical dimensions of each voxel: xzy (in mm) | float, 4 bytes | 3 | 12 | 22 | Use 0.0, 0.0, 0.0 for unspecified dimensions. Should be positive. |
| Black point and white point for the initial display, with a range [0,1] | float, 4 bytes | 2 | 8 | 34 | These values are used to construct a color LUT for display purposes. Use 0.0, 1.0 for default display. |
| Gamma for the initial display, > 0.0 | float, 4 bytes | 1 | 4 | 42 | This value is used to construct a color LUT for display purposes. Use 1.0 for default linear display. |
| Color code:
The text "g08", "i08", or "c24" |
char, 1 byte | 3 | 3 | 46 | This color code specifies the color format that the image values represent: grayscale 8 bit, *indexed 8 bit , or color 24 bit (3 bytes in RGB order) respectively. |
| Text description of the Space Volume Type 1 file format | char, 1 byte | 4900 | 4900 | 49 | **See footnote for text to use . Fill unused length with space characters. This text is only used for human readable self documentation of the file structure. |
| Text title for the volume | char, 1 byte | 151 | 151 | 4949 | Fill unused length with space characters. |
| Text description of the volume | char, 1 byte | 4900 | 4900 | 5100 | Fill unused length with space characters. |
| Image values:
(Color code – value order) g08 – -x/-z/-y order
c24 – rgb/-x/-z/-y order |
byte (8 bit integer), 1 byte |
g08 – x*y*z
c24 – 3*x*y*z |
x*y*z
3*x*y*z |
10000 | One byte/voxel (8 bit integer), x varies fastest. One bytes/voxel (8 bit integer) One byte/color, three bytes/voxel, color then x varies fastest. |
** Insert the following, without quote marks, as the "Text description of
the Space Volume Type 1 file format":