Print

Print


Hi Elena,

I usually work more with structural than functional analyses, so probably some other people on this list are better qualified to correct me and/or point to specific pipelines, etc. However, usually I think you would want to co-register the subject functional to the subject anatomical (i.e., opposite of first line) because FLIRT tends to work better with a hi-res image as the reference. You can always invert the matrix with convert_xfm to get the transform to go the other way. 

Then, I'm not sure what your images are filename-wise, but you would want to use the subject anatomical image (not the functional image) to co-register to MNI space. To ultimately get the subject functional into MNI space, you can use convert_xfm to combine the transforms.

So, overall, I think you'd want to do something like the following:

> flirt -in SUBJ_CENTRAL_FUNC_IMAGE -ref SUBJ_ANAT_IMAGE -out F2S -omat F2S.mat -dof 6
> flirt -in SUBJ_ANAT_IMAGE -ref MNI_2mm_Template -out SA2T -omat SA2T.mat
> convert_xfm -omat SF2T.mat -concat SA2T.mat F2S.mat
> flirt -in SUBJ_CENTRAL_FUNC_IMAGE -ref MNI_2mm_Template -out SF2T -applyxfm -init SF2T.mat

That being said, you should probably use the BBR cost function for FLIRT in the first step if your functional data is EPI (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FLIRT_BBR). Someone else would have to help with the specifics of that, though.

All the best,
Mike 











On Tue, Dec 17, 2013 at 10:25 AM, Elena Kalinina <[log in to unmask]> wrote:
Dear Michael,
thanks a lot for your response! I tried to put the dof option on the first line and deleted it from the second, like:

flirt -in SUBJ_ANAT_IMAGE  -ref $SUBJ_CENTRAL_FUNC_IMAGE -out S2F_Filename -dof 6

flirt -in S2F_Filename -ref MNI_2mm_Template -out S2F2T_Filename -omat  str2func2templ.mat

but in this case the second coregistration goes all distorted (see attachment) and as a consequence also the functional to template. Can you help? Thanks!

best
Elena



--
Michael G. Dwyer, Ph.D.
Assistant Professor of Neurology
Director of Technical Imaging Development
Buffalo Neuroimaging Analysis Center
University at Buffalo
100 High St. Buffalo NY 14203
[log in to unmask]
(716) 859-7065