Thanks Bruce. I used mri_info to verify. And there seems to be a small mismatch.
I have an original contrast overlay file 'sig.nii', then I used
mri_vol2vol --mov sig.nii --targ $SUBJECTS_DIR/$subj/mri/T1.mgz --reg register.dat --o sig-aligned.nii
to get a new overlay sig-aligned.nii which is aligned with T1.mgz.
From mri_info,
'sig.nii' is 64*64*42 'sig-aligned.nii' and 'T1.mgz' both 256*256*256
however, the voxel to ras transform for 'sig-aligned': -1 0 0 130.5 0 0 1 -111.6 0 -1 0 115.8 0 0 0 1.0
and voxel to ras transform for 'T1.mgz': -1 0 0 129.9 0 0 1 -105.6 0 -1 0 129.2 0 0 0 1.0
So the two matrices are different from one another. Is that OK?
Lingqiang
you can use mri_info to verify that the geometry is the same On Thu, 12 Apr 2012, Lingqiang Kong wrote:
Hi Bruce,
Yes that's what I wanted! The --fstarg flag uses the $SUBJECTS_DIR/$subj/mri/orig.mgz as the targ so in my case it would be the same as using --targ $SUBJECTS_DIR/$subj/mri/T1.mgz.
So I guessed it had worked from the beginning but I had mistakenly thought that it didn't. It just looked different to my eyes because the functional contrast sig.nii looked one size bigger than the T1 structural and a lot of stuff seems to be outside the brain (now I take it that it's normal to look this way?).
Thank you so much for your clarification. I was really confused about what mri_vol2vol was doing.
Lingqiang
Hi Lingqiang
do you mean in voxel register with the anatomy, with the same voxel dimensions, etc...? If so I think you can specify --targ \ $SUBJECTS_DIR/$subject/mri/T1.mgz
or you mri_convert with -rl <path to T1.mgz>
cheers Bruce
On Thu, 12 Apr 2012, Lingqiang Kong wrote:
Hi Surfers,
I am trying to resample a GLM analysis contrast overalay ('sig.nii') back to individual subject anatomical space (T1.mgz). The functional scans and the anatomical scans were acquired on two different days and were co-registered with register.dat. The T1.mgz has high resolution and the sig.nii has low resolution.
I used mri_vol2vol --mov sig.nii --fstarg --reg register.dat --o sig_high.nii
trying to generate a new overlay 'sig_high.nii' which is aligned with T1.mgz.
However, this only generated the appropriate tranformation but did not really "MOVE" the sig_high.nii to align with the T1.mgz. (I checked using tkregister2 and also with loading all three files in Matlab using MRIread()). The sig_high.nii is aligned with sig.nii instead of T1.mgz.
In the end, I want to load them in Matlab by MRIread and have the new sig_high.nii aligned with T1.mgz. How do I do that?
Thank you.
Lingqiang
freesurfer@nmr.mgh.harvard.edu