Print

Print


Dear SPMrs,

We are trying to perform a longitudinal study of DTI images and using the following script for the corregistration. However, the corregistration we get is rather bad. Any other ways of making the corregistration successfully?

Thank you in advance,

Naroa.

IMA3D  = spm_select(1,'IMAGE','Selecciona els 3d')

IMAT2  = spm_select(1,'IMAGE','Selecciona el t2')

IMAMAP = spm_select(Inf,'IMAGE','Selecciona les altres imatges a moure')

V3D  = spm_vol(IMA3D);

VF   = spm_vol(IMAT2);

VMAP = spm_vol(IMAMAP);

% Initial 6 parameter registration

x     = spm_coreg(V3D,VF);

% Refine this with a 12 parameter registration

flagsC = struct('params',[x 1 1 1 0 0 0]);

x     = spm_coreg(V3D,VF,flagsC);

M     = inv(spm_matrix(x));

% Update the .mat files

spm_get_space(VF.fname,M*VF.mat);

for i=1:length(VMAP),

    spm_get_space(VMAP(i).fname,M*VMAP(i).mat);

end;

P={IMA3D,IMAT2,IMAMAP};

flagsR.mean=0;

flagsR.hold = 0;

flagsR.which=1;

flagsR.mask=0;

spm_reslice(P,flagsR);