Hi - the transform that FLIRT estimates takes your functional to the structural space.  Therefore (in general) you need to use the structural image as the reference when you apply this transform to the functional image.  Using the functional as the reference will not necessarily give you sensible output.   You say that you don't want anything resampled, in which case - what are you trying to achieve with that final call to flirt below?

Cheers, Steve.



On 18 Sep 2012, at 07:44, Chris Keown wrote:

Hello,

I'm having a very difficult time with registration in FSL--been using AFNI for too long--and I think I need some clarification. I have a functional image, and I want to register it to my anatomical. I do NOT want to standardize anything nor resample. From what I have gathered off of the internet (primarily the NITRC website), I need to extract a subbrick from my functional image, coregister that one subbrick, and then apply that transform to my actual functional image. My code looks like this:

3dcalc -a ${subj}_resting_moco_ss+orig'[7]' -expr 'a' -prefix coreg_func_slice.nii.gz
flirt -ref ${subj}_anat_brain -in coreg_func_slice -out coreg_func_slice_post -omat coregistration_e2a.mat -cost corratio -dof 6 -interp trilinear

When I view the output of this, the alignment looks amazing, but my functional was resampled to my anatomical, which I do not want. Next, I try to apply the matrix from the above step to my functional image using this code:

flirt -in ${subj}_resting_moco_ss_b6_LP -ref ${subj}_resting_moco_ss_b6_LP -out ${subj}_resting_moco_ss_b6_LP_e2a -init coregistration_e2a.mat -applyxfm

When I view the results, it's pretty much all truncated and what's left is completely off in alignment. I don't know what to put in for the -ref argument. I have tried using my input image for it, because I don't want anything resampled, but the registration is still off. Any thoughts? Your help is much appreciated!



---------------------------------------------------------------------------
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director,  Oxford University FMRIB Centre

FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222726  (fax 222717)
[log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
---------------------------------------------------------------------------