The Format of VMR Files

The Format of VMR Files

VMR files contain high-resolution anatomical 3D data sets, typically containing the whole brain (head) of subjects. The intensity values are stored as a series of bytes. See the V16 format for a version storing each intensity value with two bytes (short integers). The VMR format contains a small header followed by the actual data. The current description of VMR files is "2", which contains additional header information after the actual data ("post-data header"). The information in the post-data header contains position information (if available) and stores a series of spatial transformations, which might have been performed to the original data set ("history record"). The post-header data can be probably ignored for custom routines, but is important for coregistration routines in BrainVoyager.

VMR Pre-Data Header

BYTES

DATA TYPE

DEFAULT

DESCRIPTION

2

unsigned short

2

File version

2

unsigned short

256

DimX, dimension of X axis

2

unsigned short

256

DimY, dimension of Y axis

2

unsigned short

256

DimZ, dimension of Z axis

 

VMR Data

Each data element (intensity value) is represented in 1 byte. The data is organized in three loops:

DimZ

DimY

DimX

 

With the default values above, the total number of bytes (for data without header) is therefore: DimX * DimY * DimZ = 16MB.

 

Note that the axes terminology follows the internal BrainVoyager (BV) format. The mapping to Talairach axes is as follows:

BV X front -> back = Y in Tal space
BV Y top -> bottom = Z in Tal space
BV Z left -> right = X in Tal space

 

VMR Post-Data Header

The post-data header keeps scan position information from the original file headers, e.g. from DICOM files. The coordinate axes are not in terms of BrainVoyager's internal conventions but follow the DICOM standard.

BYTES

DATA TYPE

DEFAULT

DESCRIPTION

4

int

 

"PosInfosVerified" flag indicating that info could be read from original files

4

int

1

Coordinate system entry, "1" = DICOM

4

float

 

X coordinate of center of first slice

4

float

 

Y coordinate of center of first slice

4

float

 

Z coordinate of center of first slice

4

float

 

X coordinate of center of last slice

4

float

 

Y coordinate of center of last slice

4

float

 

Z coordinate of center of last slice

4

float

 

Slice row direction vector, x component

4

float

 

Slice row direction vector, y component

4

float

 

Slice row direction vector, z component

4

float

 

Slice column direction vector, x component

4

float

 

Slice column direction vector, y component

4

float

 

Slice column direction vector, z component

4

int

 

Nr of rows of slice image matrix

4

int

 

Nr of columns of slice image matrix

4

float

 

Extent of field of view (FoV) in row direction [mm]

4

float

 

Extent of field of view (FoV) in column direction [mm]

4

float

 

Slice thickness in mm

4

float

 

Gap thickness in mm

 

 

 

NrOfPastSpatialTransformationsAlways "0", not used at present

 

 

 

 

1

byte

1

radiological (1) or neurological (0) convention

 

 

 

 

 

 

 

Name of file selected when loading original data from disk

 

Old VMR file versions

The header of version 1 was defined as follows:

VMR header, version "1"

BYTES

DATA TYPE

DEFAULT

DESCRIPTION

2

unsigned short

256

DimX, dimension of X axis

2

unsigned short

256

DimY, dimension of Y axis

2

unsigned short

256

DimZ, dimension of Z axis

  
The data was saved in the same way as for version 2. There was no additional header information after the data.