top | previous

The COR Volume Format

COR volumes are used to store high-resolution structural data and other data which are to be overlaid on the high-resolution structural volume.

COR volumes always have three dimensions (the three spatial dimensions; no time dimension is stored in COR format), and each dimension is 256 voxels to the side. The voxels are 1 mm to the side, so a volume in COR format will always contain 2563 voxels and will represent a cubic volume 25.6 cm to the side. The origin is taken to be the center of the volume.

The voxel values in the volume are stored as unsigned bytes in coronal slices, one slice to each file, which are named COR-001 to COR-256. The fastest varying index in the coronal slice files increases from right to left in the volume, and the next fastest varying index increases from superior to inferior. Slice numbers increase from posterior to anterior.

Note that given this naming convention, we can only have one COR volume in any directory. Usually, one will find that a COR volume has a directory to itself (with nothing else in the directory), and COR volumes are specified by their directory name.

In addition to the slice files, there is a header file named This file contains a list of parameters in ascii text. Each line contains a keyword or variable name followed by one or more values. Often, a file will begin as follows:

imnr0 1 
imnr1 256 
x 256 
y 256 
thick 0.001000 
psiz 0.00100 

These few lines tell us that the first slice number (imnr0) and the last slice number (imnr1) are 1 and 256, respectively, that the size of each slice is 256 by 256 voxels, that the slice thickness (equivalent to the slice spacing in COR format) is 0.001 m, and that the in-plane resolution is 0.001 m.

A complete list of the header fields is given below.


the number of the first slice


the number of the last slice


the voxel data type


the number of columns in each slice


the number of rows in each slice


the field of view


the slice thickness (slice spacing) in m


the in-plane resolution in m




the minimum value x can take in m


the maximum value x can take in m


the minimum value y can take in m


the maximum value y can take in m


the minimum value z can take in m


the maximum value z can take in m








transform file

The following fields give the exact position and orientation of the volume. These are taken from the original volume and most often give the orientation of the volume in scanner coordinates:


flag telling if the orientation fields are set


RAS coordinates of the x dimension (fastest varying)


RAS coordinates of the y dimension (next fastest varying)


RAS coordinates of the z dimension (increases with slice number)


RAS coordinates of the center of the volume.

Note that x_ras, y_ras, and z_ras are normalized to unit length (psiz and thick give the voxel size), and c_ras is given in mm.

The ras_good_flag parameter tells if this information was available and preserved; if it is zero or none of these fields exist, the volume is assumed to be oriented and positioned as described above, as if the position and orientation parameters are set as follows:

x_ras -1.0 0.0 0.0
y_ras 0.0 0.0 -1.0  
z_ras 0.0 1.0 0.0
c_ras 0.0 0.0 0.0  

The COR format is limited to storage of volume data in unsigned char format only, and does not allow int, float, double or long formats. Also, the COR format historically assumes a slice size of 256 by 256 voxels. For these reasons, the COR format is deprecated in favor of the newer mgh (and mgz) format.

FsTutorial/CorFormat (last edited 2008-04-29 11:46:18 by localhost)