Issues in FMRI Image Orientations and Display
Some basic conventions
- The left side of the brain is denoted by negative x coordinates,
and regions in the right side of the brain are given by positive x coordinates.
Thus, real-world x coordinates increase from left to right. Real-world y
coordinates increase from posterior to anterior. Real-world z coordinates
increase from inferior to superior. This is the way
that the Talairach and Tournoux atlas is organized. This is an example of
- Real-world coordinates do not necessarily correspond to voxel coordinates,
i.e. how the image is stored in the file!!! For instance, while real-world
x coordinates might be increasing as you move from the left side of the brain
to the right side, the actual voxel index in the volume is decreasing. In
other words, the image is stored in Right-to-Left format. This is an example
of a left-handed
coordinate system and is the convention for Analyze format files.
- The opposite movement of voxel coordinates and real-world coordinates in
the X dimension is what leads people to talk about Analyze files as being
stored in radiological format. However, images can be displayed "radiologically"
or "neurologically" irrespective of the format that the data are stored in.
The FSL and SPM viewers described below provide an excellent case in point.
- The "standard-space" image is the MNI image, 'avg152T1' which is considered
to be in Analyze format, i.e. a left-handed coordinate system.
- Fslview displays images in "radiological" convention, which means that
the left side of the image corresponds to the right side of the brain.
- Let us consider how it displays the standard space images provided with
the FSL and SPM5 distributions.
- When loading $FSLDIR/etc/standard/avg152T1.img,
- The image is displayed such that moving the crosshairs leftward
on an axial slice causes the mm coordinate to increase but the x
voxel index to decrease. This means that voxel 0 is at leftmost edge
of the image (right side of the brain).
- When loading /afs/cmb.ucdavis.edu/share/matlab/janata/spm5/canonical/avg152T1.nii
- The image is displayed in the same way as the image from the FSL
distribution described above.
- Note that the SPM distribution has a file written in Nifti
format. The header information contains coordinate information.
Fields (qform_xorient, sform_xorient) in the header specify that
the voxels in the x-direction are written from Right-to-Left, consistent
with the left-handed coordinate system of Analyze format. The FSL
distribution contains an Analyze format file (.img, .hdr) file
pair. The header does not contain coordinate system information,
and a left-handed (Analyze) coordinate system is assumed.
- NOTE: in the sagittal view, the front of the brain is shown on the
right side of the image
SPM5 Display Utility
- The SPM5 display utility displays images in "neurological" convention,
which means that
the left side of the image corresponds to the left side of the brain.
- When loading the standard space file in the SPM5 distribution, the
image displays such that moving the crosshairs from right to left in
the axial slice causes the mm x-coordinate to decrease (consistent with
the left side of the brain being displayed on the left side of the image,
i.e. neurological convention), whereas the voxel coordinate increases
the further left you go.
- When loading the standard space Analyze format file from the FSL distribution,
the displayed result depends on how one of SPM's default variables is
- Within spm_defaults.m,
the variable defaults.analyze.flip is set to 1 (TRUE). When set to
1 (default), the file is displayed incorrectly, i.e. both the real
world and voxel x coordinates increase in the same direction (from
left to right). The error is easily verified by loading the avg152T1_LR-marked.img
file from the FSL distribution. If the volume was correctly displayed
in neurological format, the side of the brain marked with the R would
show up on the right side of the image. However, it shows up on the
left side. Thus, the assumed coordinate system is being flipped from
left-handed to right-handed.
- When defaults.analyze.flip=0, FSL's
Analyze format version of avg152T1 is correctly interpreted in a
left-handed coordinate system (but displayed neurologically because
that's what SPM does). This is readily verified by loading the marked
up image, which now displays correctly.
- Unfortunately, the situation is further complicated. FSL's standard
space file has the x pixdim (the scaling factor for the x-dimension)
multiplied by -1, which flips the x dimension and changes the coordinate
system. Thus, when loading the files with a negative x pixdim, you
don't want SPM to be flipping in x and so you want the flip field
to be set to 0. However, the Analyze format files in the fMRIDC datasets
don't have a negative x pixdim and so they do need to be flipped
(assuming the orientation of the data is radiological, but the header
doesn't accurately reflect this fact). When the header files are
subsequently modified by SPM, the pixdim stays the same, but the
sform and qform fields are set to have a negative pixdim so that
the same flip is accomplished.
- What this means is that 'defaults.analyze.flip' must be
set to 0 for the SPM5 Nifti reader to correctly assume that Analyze
files (.img, .hdr) are stored in a left-handed coordinate system
if loading the FSL files, but must be set to 1 to correctly interpret
Analyze files with all positive pixdims (if indeed the data are
in radiological format).
- NOTE: The header in the FSL canonical image file is a technically
correct ANALYZE file in that the x pixdim is negative, and
therefore conforms to a left-handed coordinate system.
- NOTE: in sagittal view, the front of the brain is shown on the left
side of the image.
February 19, 2006 22:16