As promised, here is a script that some people may find useful
for doing "optimised" VBM (as in Tina Good's paper). Note that
there is a brand new patch that may be required for it to work.
---------------------------------------------------------------
spm_defaults
global defaults
dseg = defaults.segment;
dseg.write.wrt_cor = 0;
dnrm = defaults.normalise;
dnrm.write.vox = [1 1 1];
dnrm.write.bb(1,3) = -70;
dnrm.estimate.graphics = 0;
V = spm_vol(spm_get(Inf,'*.IMAGE','Select images'));
VG0 = spm_vol(fullfile(spm('Dir'),'templates','T1.mnc'));
VG1 = spm_vol(deblank(dseg.estimate.priors(1,:)));
for i=1:length(V),
[pth,nam,ext] = fileparts(V(i).fname);
VT = spm_segment(V(i),VG0,dseg);
VT = VT(1);
prm = spm_normalise(VG1,VT,'','','',dnrm.estimate);
clear VT
VN = spm_write_sn(V(i),prm,dnrm.write);
VT = spm_segment(VN,eye(4),dseg);
clear VN
VT(1).fname = fullfile(pth,['G' nam ext]);
VT(2).fname = fullfile(pth,['W' nam ext]);
spm_write_sn(VT(1),prm,'modulate');
spm_write_sn(VT(2),prm,'modulate');
clear VT
end;
---------------------------------------------------------------
Best of luck,
-John
--
Dr John Ashburner.
Functional Imaging Lab., 12 Queen Square, London WC1N 3BG, UK.
tel: +44 (0)20 78337491 or +44 (0)20 78373611 x4381
fax: +44 (0)20 78131420 http://www.fil.ion.ucl.ac.uk/~john
|