|
|
File format specification
for "Slices Volume Type 1"
This table describes the Slices Volume byte structure. It consists
of a 10000 byte header containing a volume/file description followed by
uncompressed volume data.
| Contents |
Data type |
Number |
Length, bytes |
Byte offset from beginning of file |
Comments |
| |
|
|
|
|
|
| The text "mdvol" |
char, 1 byte |
5 |
5 |
0 |
Identifier for this file type |
| The text "1" |
char, 1 byte |
1 |
1 |
5 |
mdvol file version indicator. |
| 10000 |
int, 4 bytes |
1 |
4 |
6 |
Length of header, for an mdvol version 1. |
| Volume dimensions, xyz in pixels. |
int, 4 bytes |
3 |
12 |
10 |
Must correspond with the length of volume values. |
| Physical dimensions, xyz in mm, of each voxel |
float, 4 bytes |
3 |
12 |
22 |
Use 0.0,0.0,0.0 when voxel size is not specified. |
| Black point and white point for the initial
display, with a range [0,1] |
float, 4 bytes |
2 |
8 |
34 |
These values may be used to construct a LUT
for display purposes. Use 0.0,1.0 for default display. |
| Gamma for the initial display, > 0 |
float, 4 bytes |
1 |
4 |
42 |
This value may be used to construct a LUT for
display purposes. Use 1.0 for default linear display. Gamma is applied
after the black/white point |
| Color code:
The text "g08", "g16", or "c24" |
char, 1 byte |
3 |
3 |
46 |
This color code specifies the type of image
data: grayscale 8 bit, grayscale 16 bit, or color 24 bit (3 bytes in RGB
order) respectively. |
| Text description of the file format. |
char, 1 byte |
4900 |
4900 |
49 |
**See below for text to use.
Fill unused length with space characters. |
| 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/y/z order
g16 – x/y/z order
c24 – rgb/x/y/z order |
byte, 1 byte |
g08 – x*y*z
g16 – 2*x*y*z
c24 – 3*x*y*z |
x*y*z
2*x*y*z
3*x*y*z |
10000 |
One byte/voxel (8 bit positive integers), x varies fastest.
Two bytes/voxel (16 bit positive integers)
One byte/color, three bytes/voxel. |
** Insert the following as the "Text description of the file format":
" This is a simple file, consisting of a header and a set of value
bytes, for storing volume image data. Specified by Mark Dow, January 2001.
The header is a total of 10000 bytes: The first five characters (mdvol,
5 x 1 byte) identify the file as volume with this file type. One character,
1 byte, serves as a version indicator -- this is version 1. One integer,
4 bytes, is the total length of the header. Three integers are dimensions,
xyz in pixels, of the volume. Three floats, 3x4 bytes, are physical dimensions,
xyz in mm, of each voxel. Two floats indicate a reasonable black point
and white point for the initial display, with a range [0,1]. One float
indicates a reasonable gamma for the initial display where the gamma is
applied after the black/white point. Three characters specifies gray 8
bit, g08, gray 16 bit, g16, or color 24 bit, c24, byte information. 4900
characters, 4900 x 1 byte, of text is this description of the file format.
151 characters are a text title. 4900 characters are a text description
of the volume contents. The rest are bytes, in x/y/z or rgb/x/y/z order,
describing the image data. If the color character is g08, there are x*y*z
bytes of color data. If the color code is g16, there are 2*x*y*z bytes
of color data. If the color character is c24, there are 3*x*y*z bytes of
color data. "
|