Brain Innovation

support portal


BrainVoyager Automation & Development File Formats Users Guide (2.3) - The Format Of VDW Files

Users Guide (2.3) - The Format Of VDW Files

A VDW file contains the diffusion-weighted data of one experimental run in the space of a 3D anatomical data set (VMR), e.g. in ACPC or Talairach space. The binary file contains a variable-length header followed by the actual 4D data. The data is not stored as a sequence of volumes (time points), but contains for each voxel a continuous stream of values representing the voxel's time course. This arrangement (repeated measures of a voxel in the inner loop) has been chosen for VDW (and VTC) files in order to increase the efficiency of accessing voxel time series via file-based access. At the end of the header, the VDW file contains information specific to diffusion-weighted measures, including a gradient direction table.

The most recent file version is "2". The main addition as compared to version 1 is a new entry specifying the data type of the stored measurement values. While the previous VDW version only supported 2-byte integer values, the new file format supports also 4-byte float values. The value of the data type entry specifies whether 2-byte integer (value "1") or float (value "2") values are stored in the data part of the file.

The following table describes VDW file format 2 and also version 1 by indicating the entries which have been changed.

VDW Header

2 short int 2 version number
S byte   name of DMR file whose DWI data has been transformed (*1)
2 short int 1 number of protocols (NP) attached to VDW    (new v2)
NP x Mi byte <none> NP names, each specifying a linked protocol (PRT) file (*1)
2 short int 0 index specifying the "current" protocol    (new v2)
2 short int 2 data type of stored values ("1" - short int, "2" - float)    (new v2)
2 short int   NrOfVolumes (number of volumes, measurements, time points)
2 short int 3 resolution relative to VMR, e.g. "3" - 1 voxel = 3 x 3 x 3 VMR voxels (*2)
2 short int 57 XStart (*3)
2 short int 231 XEnd (*3)
2 short int 52 YStart (*3)
2 short int 172 YEnd (*3)
2 short int 59 ZStart (*3)
2 short int 197 ZEnd (*3)
1 byte   left-right convention flag (*4)    (new v2)
1 byte   reference space flag (*5)   (new v2)
4 float   TR [ms]
4 int   TE [ms]
1 byte   GradientDirectionsVerified, boolean entry, values "1" or "0"
1 byte   GradientXDirInterpretation, values "1" - "6" (*6)
1 byte   GradientYDirInterpretation, values "1" - "6" (*6)
1 byte   GradientZDirInterpretation,values "1" - "6" (*6)
1 byte   GradientInformationAvailable
N x 4 float   IF table available, NrOfVolumes x 4 - gradient X/Y/Z plus B - values
1 byte   NrOfSpatialTransformations, used to update direction table
IF (NrOfPastSpatialTransformations > 0) list of past spatial transformations (*7)

(*1) Variable length ("S" bytes), the end of the name is indicated by '0'.

(*2) The VDW resolution is defined with respect to the resolution of a VMR file. Typically, one VMR voxel has the resolution of 1 (Talairach) mm3. A VDW resolution value of 3 means that one VTC voxel encompasses 3 x 3 x 3 = 27 VMR voxels. Other resolutions are possible,  i.e. 1 and 2.

(*3) These values indicate the relative position within a VMR volume (must be a 2563 data set for Talairach VDW data, (see explanations below).

(*4) The left-right convention flag may assume one of three values: "1" specifies radiological convention ("left-is-right"), "2" specifies neurological convention ("left-is-left") and "0" indicates that the convention is unknown.

(*5) The reference space flag may have the following values: "1" indicates that the functional data is aligned to a 3D data set in "native" space (e.g. in the position scanned), "2" indicates ACPC space, "3" indicates "Talairach" space and "0" indicates that the reference space is not known.

(*6) The numerical values 1 - 6 represent how the respective component (first or "X", second or "Y", third or "Z") in the gradient table are interpreted with respect to the three cardinal axes. The interpretation of the value is "Left to Right" (value 1), "Right to Left" (2), "Anterior to Posterior" (3), "Posterior to Anterior" (4), "Inferior to Superior" (5) and "Superior to Inferior" (6). For details, see topic DMR Projects.

(*7) The structure of how spatial transformations are stored is described in the topic about VMR files.

VDW Data

Each data element (intensity value) is represented in 2 bytes (unsigned short) or 4 bytes (float) as specified in the "data type" entry. The data is organized in four loops:





The inner loop (DimT = NrOfVolumes) contains the different measurements for each VDW voxel. The spatial dimensions can be computed from the header info as follows:

DimX = (XEnd-XStart) / VDW-resolution
DimY = (YEnd-YStart) / VDW-resolution
DimZ = (ZEnd-ZStart) / VDW-resolution

Example. With a VDW resolution of 2 and the default dimension values provided above in the header, this results in:

DimX = 87
DimY = 60
DimZ = 69

With these values and a typical NrOfVolumes of 125, the total number of bytes for float data is therefore:

DimX * DimY * DimZ * NrOfVolumes * 4 = 180,090,000

or approximately 172MB.

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

You are here: HomeBrainVoyagerAutomation & DevelopmentFile Formats ≫ Users Guide (2.3) - The Format Of VDW Files