> This is a question that has troubled most of us for dozens of hours.
It certainly has.
> Here are a few remarks:
These are (mostly) good comments. I thought that I would elaborate on them a
little.
> 1) the image file is just a sequence of bytes, which has no defined
> orientation. The way it is displayed (radiological vs neurological)
> depends on the image viewer and its parameters
This is true. The important thing is what the order of the bytes actually
mean. i.e. which direction changes fastest, which direction changes slowest
etc. SPM assumes that this sequence of bytes is reordered into a 3D array
(much like the Matlab reshape function does), and uses a voxel to world
mapping to get from the indices of the bytes to a real world space. The
mapping should be such that the resulting coordinates are within a
right-handed system.
e.g. for a 4x3x2 3D image, the bytes would be numbered as following in the
first plane:
1 2 3 4
5 6 7 8
9 10 11 12
and as here in the second plane:
13 14 15 16
17 18 19 20
21 22 23 24
For example, the indices are 1,2,2 for voxel number 17, and 1,2,1 for voxel
number 5. We can generally call these i,j,k. A voxel to world mapping by a
matrix M would map to real world coordinates.
x = m_11*i + m_12*j + m_13*k + m_14
y = m_21*i + m_22*j + m_23*k + m_24
z = m_31*i + m_32*j + m_33*k + m_34
Such an affine transform can encode different zooms, rotations and
translations. If you use the SPM conversion routines to convert from DICOM
to NIFTI, then information in the DICOM files is used to generate the
voxel-to-world mapping. In SPM5, it is written in the .hdr files. In SPM2,
it is written in .mat files. SPM99 is now very ancient, so I'm not going to
say anything about it.
>
> 2) The defaults.analyze.flip parameter can be vicious. Changes do not
> always produce the expected results. It depends, amongst others, on the
> presence of a .mat file
> (http://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind03&L=SPM&P=R221621&I=-3).
> It should never be changed.
The defaults.analyze.flip parameter is not needed for images in NIFTI format.
It is only there for compatibility with images created by SPM99, and other
Analyze images that don't have .mat files.
> 3) The image on SPM's 3D views can be wrong even if it is correctly
> displayed on the slices. It assumes your images are in the neurological
> orientation.
The orientations in the orthogonal viewer should be the same as described on
our web site. If you click on the left side of the brain, then the x
coordinates in world space should be smaller than those that arise when you
click on the right side.
The slices viewer (when you get three slices though an image, with blobs
superimposed) just displays the data as it is stored in the file. These
could be saggital, coronal or axial, and they could be slices after the image
volume has been rotated in any way. For this reason, it is a good idea to
check the coordinates of different positions in the slices, as this will tell
you which is the left or right side of the brain (assuming you have your file
format correct).
> 4) For clinical use, I use radiological convention.
Is there any such thing as radiological convention for coronally or saggitally
oriented data? I prefer to use the terms left- or right- handed. See
http://www.fil.ion.ucl.ac.uk/~john/misc/handedness.gif
> For research
> studies, if I want to use the neurological convention, I flip the image
> files simply with the "Display " tool (resize {x} = -1, then "reorient
> images", and select ALL the images). You must do it before the analysis. I
> once tried to flip the contrast files, it did not work.
I wouldn't personally suggest doing mixing orientations (handedness). If you
want to display rotated images, then I would suggest rotating then by pi
radians about the y axis.
If you really need to flip, then you should be very careful to make sure that
they are flipped the appropriate number of times. The spm_orientations
function is useful for this. Type the following to see how it is used...
help spm_orientations
>
> 5) The only way to be sure is to use an external marker (tube filled
> with water or contrast agent), or to identify an assymetry in the brain
> during the MR acquisition. You check it 2-3 times, then you can trust your
> orientation. If ANYTHING changes (scanner, file format, image converter,
> analysis software,...), you repeat the validation procedure.
If you are in a small lab with very little scientific support, then I would
definately suggest using external markers. Here at the FIL, providing we are
using data from our own scanners, then we don't have any of these orientation
issues at all. It is only when we have to take data from elsewhere that the
problems arise.
>
> Hope it helps...
If you use SPM5 with NIFTI format and a reliable format converter, and dont
mix your orientations - then you shouldn't have any problems at all.
Best regards,
-John
|