In SPM2, the defaults.analyze.flip is only used when working out the
orientations of images without a .mat file (or a .mat file created with
SPM99). If there is a .mat file, then defaults.analyze.flip, the origin
field, and the voxel sizes are all ignored.
If you use the DICOM conversion in SPM2, then images should be created with a
.mat file (unless they are exactly axial and the origin is at the exact
centre of a voxel). The conversion routine will take the value of the flip
in order to figure out whether the order that the voxels are stored in should
be left- or right- handed. The values in the .mat file are set so that
images are displayed using a right-handed system. Providing you don't change
the value of defaults.analyze.flip, then this should guaruntee that images
will be displayed within a right-handed system when using SPM2's Display
button.
Using the DICOM conversion routine, the order of slices will differ depending
on whether they are "radiological" or "neurological". This guaruntees that
your images all either conform to left-handed storage (flip=1), or they all
conform to right-handed storage (flip=0). Either way, the images should
display as right-handed.
If you use some other way of converting the data, then I can be less sure of
the handedness of the Analyze format volumes.
> >Here's the scenario:
> >We collect a functional spiral file and T1 in radiological orientation.
Radiological is just a way of displaying axial images. If your slices are
ordered one way, then the storage is right-handed. If it is ordered another
way then the storage is left-handed. If the planes are stored upside down,
then this will also change the handedness of the storage.
> >However, we collect our high resolution spgrs in neurological orientation.
> >We use the default defaults.analyze.flip=1 for spm2 because the functional
> > and T1 are indeed radiological.
> >However, we L-R flip the spgr so that it will be in radiological
> > orientation as well....this flipping is, of course, recorded in the mat
> > file.
This is the wrong thing to do if you used the SPM2 DICOM toolbox.
It may or may not be the wrong thing to do if you used some other way of
converting your DICOM files.
> >Now, when spm2 displays any of our images, it will look at the
> >defaults.analyze.flip=1
> >and it will display everything in neurological orientation (flipped)...
I can't really comment unless I know how the data were converted. If the
actual data are stored axially such that the first voxel in the file is the
most inferior, anterior and right, then this is left-handed storage (voxel
co-ordinates). If the first voxel is the most inferior, anterior and left,
then this is right-handed storage. Try displaying an image, and moving the
cross-hairs to voxel [1 1 1].
The determinant of the images "voxel-to-world mapping" will indicate whether
there should be a flip from a left-handed "voxel coordinate system" to a
right-handed "world coordinate system". If you display an image, then you
will see if SPM2 is using such a flip, by looking for any negative voxel
sizes. If your data are stored left-handed, then one of the voxel sizes
should be negative. If not, then voxel sizes should all appear positive.
A voxel-to-world mapping is derived from the .mat file (if it exists). If
there is no .mat file, then the origin and voxel sizes from the .hdr are
used, along with the value of defaults.analyze.flip.
> >BUT, doesn't spm2 also know that we have flipped the spgr L-R? If so,
> > what are it's assumptions in displaying that image?
Flipping using the Display button will create or change the images .mat file
in order to reflect the flip.
> >
> >Possibility 1) It displays the image correctly because it reads
> >defaults.analyze.flip=1....assumes the image is radiological (which it is
> > now), and flips the display into neurological. End of Story.
> >
> >Possibility 2) It tries to be clever...assumes we started with the spgr in
> >radiological, that we flipped it into neurological and now it does NOT
> > flip again when it displays. (If this is the case, then we see the wrong
> > thing because it now displays the spgr in neurological orientation.
>
> I don't know how SPM does it, but it does! (sure that someone will
> answer that ;-) , maybe flips 2 times the image). It will show you the
> spgr in neurological orientation. Note that SPM does not really flip the
> image, it's only stored in the .mat file. If you're not sure, I suggest
> you to flip your images with MRIcro (or other soft) and compare the
> results ...
If your SPGR is stored with a right-handed system and you didn't use SPM2's
DICOM conversion routines, then the hdr will probably all contain positive
voxel sizes and there will be no .mat file. By having
defaults.analyze.flip=1, this will cause SPM to interpret one of the voxel
sizes as being negative, and the image will be displayed using a left-handed
system. By flipping with the Display button (via the .mat file), you will
then get back to the data being displayed as right-handed.
Basically, flipping twice means not flipping at all.
Best regards,
-John
|