Hi,
The problems you are experiencing here are due to the fact that there is no universal convention for how to represent coordinates or mappings between coordinates. Hence FSL and SPM use different conventions and you cannot just simply mix and match between the two. There are some third-party tools for converting matrices between the two conventions, and I would search on the web for those. I believe that nipype has one built in, but I think there are others.
All the best,
Mark
> On 26 Oct 2017, at 01:38, Chao Suo <[log in to unmask]> wrote:
>
> Dear SPM/FSL users,
>
> I have a question about the inconsistent transform matrix during linear corregister using SPM and FSL.
> For example, I have one image (Qform is A) coregistered to an MNI space using a standard MNI template using "Coregister: Estimate" function.
> The new image’s Qform is A’. The transform matrix (TE_spm) my understand is equal to A’*inv(A).
> I can use this matrix (TE_spm) to reorient the Image to the MNI space using the function Batch-> SPM-> Util -> reorient images
>
> When I use “flirt” in FSL toolbox, the output image is also aligned to MNI space. However, the output matrix (xfm) is way different with the TE_spm I generate.
> And it doesn’t work with the “reorient images” function in SPM. Further, as the function “flirt” will reslice (resample) the image by default, the Qform of A’ generated by flirt is re-set to the centre of the image matrix.
>
> My question is how to apply the xfm to reorient the input image A to MNI space? Also, is it possible to convert the xfm in FSL to the matrix that can be used in reorient image function?
> I have attached the matrix below, for more information.
>
>
> A=[ -0.9992 -0.0244 0.0314 97.7589
> -0.0244 0.9997 0.0008 -133.7938
> 0.0314 -0.0000 0.9995 -149.3965
> 0 0 0 1.0000]
>
> A’=[ -0.9995 -0.0092 0.0317 93.3496
> 0.0067 0.8845 0.4665 -176.7222
> 0.0323 -0.4665 0.8839 -58.0182
> 0 0 0 1.0000]
>
> TE_spm= [ 0.9999 0.0152 0.0003 -2.3183
> -0.0136 0.8844 0.4665 12.6318
> 0.0069 -0.4665 0.8845 11.0441
> 0 0 0 1.0000 ]
>
> Xfm = [1.015110314 0.001403876797 -0.03273563415 -2.95397524
> -0.0340642576 0.881267329 0.4458567806 -42.9856035
> 0.03133599993 -0.4915636726 0.9529941246 7.78935539
> 0 0 0 1 ]
>
>
> Thanks,
>
> Chao
|