You may have experienced the laterality confusion after an ANALYZE image is processed by different software. You may have noticed that your processed image gets flipped by some software, but does not get flipped by others. If this is the case, the following table is created for you.
In fact, since there is no laterality information in ANALYZE file header (see note 3), all software have to make their own assumption. If their assumption is made against the actual laterality of your ANALYZE input file, you will find that the processed image will get flipped.
From the table below, given an ANALYZE input file with known laterality, you can find how different software display it, as well as the laterality of the processed output file. The RAS in the table sometimes is also referred as neurological convention, and LAS as radiological one.
In case that the output laterality is different from the input laterality, a Left / Right flipping occurs at the output end, which is highlighted by bold italic font. You may notice that the output file's laterality only flips when the output file is in NIfTI format, since no laterality information will be stored in ANALYZE format. In addition, you will not be able to observe the flipping within the same software in most cases, since the display of input file is usually also flipped together with the output file; however, you can easily find the flipping by opening the input and output files in a different software that does not do flipping. For example, using MRIcron or AFNI to compare the input file and the output file that was processed by SPM5 or FSL.
Since laterality information is always embedded in NIfTI header, there will be no more laterality confusion, unless the affine matrix is not set (i.e. both hdr.hist.sform_code and hdr.hist.qform_code are zero). Normally, a NIfTI file should not be saved like this (see note 4).
|
Software Name |
Input File
Format |
Input File Laterality |
Output File
Format |
Output File
Laterality |
Input File
Display |
|
FSL |
ANALYZE |
RAS |
NIfTI |
LAS ( / RAS see note 5) |
LAS (see note 6) |
|
LAS |
RAS ( / LAS see note 5) |
RAS (see note 6) |
|||
|
SPM5 and later |
ANALYZE |
RAS |
NIfTI |
LAS |
LAS |
|
LAS |
RAS |
RAS |
|||
|
SPM2 |
ANALYZE |
RAS |
ANALYZE |
RAS |
LAS |
|
LAS |
LAS |
RAS |
|||
|
SPM99 |
ANALYZE |
RAS |
ANALYZE |
RAS |
RAS |
|
LAS |
LAS |
LAS |
|||
|
MRIcron |
ANALYZE |
RAS |
NIfTI |
RAS |
RAS |
|
LAS |
LAS |
LAS |
|||
|
MRIcro |
ANALYZE |
RAS |
ANALYZE |
RAS |
RAS |
|
LAS |
LAS |
LAS |
|||
|
PLSgui |
ANALYZE |
RAS |
ANALYZE |
RAS |
RAS |
|
LAS |
LAS |
LAS |
|||
|
Analyze |
ANALYZE |
RAS |
ANALYZE |
RAS |
RAS |
|
LAS |
LAS |
LAS |
|||
|
AFNI |
ANALYZE |
RAS |
NIfTI |
RAS |
RAS (see note 7) |
|
LAS |
LAS |
LAS (see note 7) |
|||
|
load_nii.m / save_nii.m / view_nii.m (see note 8) |
ANALYZE |
RAS |
NIfTI |
RAS |
RAS |
|
LAS |
LAS |
LAS |
|||
|
load_untouch_nii.m / save_untouch_nii.m (see note 8) |
ANALYZE |
RAS |
ANALYZE |
RAS |
N/A |
|
LAS |
LAS |
N/A |
Notes:
1. Software version information:
2. Definition of LEFT and RIGHT:
3. You may notice that strict ANALYZE 7.5 format has a laterality field called "hist.orient". The value of this field ranges from 0 to 5 covering 6 orientations. However, many other important orientations (e.g. RAS or neurological convention) can not be expressed using Strict ANALYZE 7.5 format, which poses a critical problem for this laterality field. Therefore, the laterality of ANALYZE format is abandoned by many software.
4. In some rare situations, both hdr.hist.sform_code and hdr.hist.qform_code in a NIfTI file are set to zero, in which the NIfTI file is equivalent to an ANALYZE file. In this case, when you display such a so-called NIfTI file (because it contains NIfTI signature) in different software, you will still encounter flipping problem. For example, when you process an ANALYZE file with no origin set, you will end up with such a “NIfTI” file. All other software listed above will set either sform_code or qform_code or both, so they are fine.
5. When the originator of the input ANALYZE file is not set, i.e. hdr.hist.originator = [0 0 0 0 0], FSL will set both hdr.hist.sform_code and hdr.hist.qform_code to zero. In this particular case, the FSL output file will not flip it as usual. Since I saw many ANALYZE images like this, caution must be taken when you pipeline the FSL processed image to other software. Sample images can be downloaded to duplicate my test by clicking the link below: with_origin.hdr, with_origin.img, no_origin.hdr, no_origin.img, fsl_with_origin.nii, fsl_no_origin.nii. Where, "fsl_with_origin.nii" is obtained by opening "with_origin.hdr/img" in FSL and saving again; "fsl_no_origin.nii is obtained by opening "no_origin.hdr/img" in FSL and saving again. When you open them with MRIcron, AFNI, PLSgui, or my load_nii.m / view_nii.m, you can notice the difference. However, if you open them with FSL or SPM, you will not notice the difference because of their flipping nature of FSL and SPM.
6. The display of FSL doesn’t seem like the orientation in the table; however, if you pay attention to the flipped R / L labels beside the Axial / Coronal views, you will find that the orientation is actually also flipped.
7. The display in AFNI also depends on its setting. In any situation, it is aligned with RAS assumption. In AFNI, RAS is called "LPI order". Sometimes, the "AFNI_ORIENT" setting under "EditEnv" button is mandatory made not working. So please use the default AFNI_ORIENT that is set for you.
8. Please see details of Tools for NIfTI and ANALYZE image in MATLAB by clicking this link: http://www.rotman-baycrest.on.ca/~jimmy/NIfTI.
Contact:
If you have any question regarding to the above table, please send your feed back to me (jimmy@rotman-baycrest.on.ca).