Hello Kay,
This was my first exposure to SPM datasets and I do not have a very solid idea of how the data is stored. However, I did manage to put them in the correct orientation and align the anatomicals for surface mapping with SUMA.
The current ANALYZE format does not completely describe the spatial properties of the data set so it is not possible for the 3dANALYZEtoAFNI program to orient the output data correctly without additional information (usually added via the command line options). This problem is made more difficult by the changing standards of various FMRI analysis packages. The ANALYZE format is being modified to include the missing information so hopefully these problems will be minimized in the future. (See Bob's comments on the message board under the title: ANALYZE format and AFNI orientation)
In addition to the orientation of the dataset, there are also matrices that are used to transform a data set's alignment and geometry. In AFNI, those transforms are stored in the header file, in FSL and SPM (apparently) they are in separate files.
For the data you sent me, to create AFNI data in the correct orientation you will need to use these matrices. Bob has recently modified 3dWarp to accept FSL matrices and it looks like SPM's matrices are pretty similar (you'll need afni version 2.55c or newer). The only difference I found was in the format of the files containing these matrices. SPM uses matlab's binary format while FSL uses an ASCII file. To transform SPM's .mat files to ASCII, I wrote a matlab function called writeSPMmat.m (available from: [
afni.nimh.nih.gov]). Once you create the ASCII version of the .mat file, you can use it with 3dWarp to create an AFNI dataset.
There is more help on using 3dWarp here: [
afni.nimh.nih.gov] (search for 3dWarp).
Here what I did to align your data and map function to the surface models with SUMA.
I had three data sets (renamed slightly):
xm000.hdr, xm000.img and xm000.mat : High resolution anatomical data set
binNretino.hdr, binNretino.img and binNretino.mat : Functional data set
SurfVol+orig.HEAD SurfVol+orig.BRIK the Surface Volume Dataset created by @SUMA_MakeSpec_FS
First create ASCII versions of the .mat files using writeSPMmat then run the following:
3dWarp -prefix xm000 -matvec_in2out xm000.mat -gridset SurfVol+orig. -fsl_matvec xm000.hdr
This creates an AFNI dataset of the high-res anatomical underlay.
3dWarp -prefix binNretino -matvec_in2out xm000.mat -gridset SurfVol+orig. -fsl_matvec binNretino-areas_n1_s10_fa7_fs2_ans6+stat.hdr
This creates an AFNI data set of the functional data set. Note that I used xm000.mat and NOT binNretino.mat. Do not ask me why, that's the transform that worked. CHECK THE ALIGNMENT IN AFNI.
For mapping data on the surface model, I used @SUMA_AlignToExp to align SurfVol to xm000:
@SUMA_AlignToExperiment xm000+orig. SurfVol+orig.
This command creates SurfVol_Alnd_Exp+orig.
Now run SUMA as such:
suma -spec YourSpecFile.spec -sv SurfVol_Alnd_Exp+orig.
talk to AFNI and verify that all is well.
BTW: You might want to consider the more sophisticated volume to mapping options now available in SUMA. Look at 3dVol2Surf -help and the section titled: "Mapping from volume to surface domains" at [
afni.nimh.nih.gov] .
cheers,
-ziad