Hello everyone
Thanks to all your discussions, i know how to co-register 2 images without re-slicing them (only estimate)
But i have some problems to apply the transformation on the image.
I use these commands
>> v2=spm_vol('DTI/XXX.nii');
>> v1=spm_vol('SAG3DFLAIR/YYY.nii');
>> x=spm_coreg(v2,v1);
SPM12: spm_coreg (v5669) 12:56:45 - 26/01/2016
========================================================================
Completed : 12:56:55 - 26/01/2016
>> M = inv(spm_matrix(x));
>> spm_get_space('SAG3DFLAIR/YYY.nii',M*v1.mat);
So when i use the check reg tool of spm, XXX.nii and YYY.nii are indeed coregistered
but when i use another viewer, the images are not coregistered at all.
I thought that the spm_get_space would actually apply the transformation on the image but it does not seems to be the case.
can someone tell me how can i do it ? it would really help me.
Thanks in advance
Christophe
|