> I have several questions concerning the scripts you recently posted on the
> SPM message board for SPM2.
> I realized that you made some changes to the script posted on the 7th May
> differing from the previous script. Since I am not very familiar with
> Matlab, I would appreciate your comments on
> reasons for this changes:
> 1) current: dnrm.write.bb = reshape([-90 90 -126 90 -72 108],2,3);
> before: dnrm.write.bb = reshape([-90 91 -126 91 -72 109],2,3);
See:
http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0304&L=spm&P=R11818&I=-1
http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0305&L=spm&P=R3464&I=-1
> 2) current:
> msk = find(finite(tn));
> tmp = n(:,p); tmp(msk) = tmp(msk) + tn(msk); n(:,p) = tmp;
> tmp = g(:,p); tmp(msk) = tmp(msk) + tg(msk); g(:,p) = tmp;
> tmp = w(:,p); tmp(msk) = tmp(msk) + tw(msk); w(:,p) = tmp;
> tmp = c(:,p); tmp(msk) = tmp(msk) + tc(msk); c(:,p) = tmp;
> tmp = s(:,p); tmp(msk) = tmp(msk) + 1; s(:,p) = tmp;
> before:
> msk = finite(tn);
> n(msk,p) = n(msk,p) + tn(msk);
> g(msk,p) = g(msk,p) + tg(msk);
> w(msk,p) = w(msk,p) + tw(msk);
> c(msk,p) = c(msk,p) + tc(msk);
> s(msk,p) = s(msk,p) + 1;
This was changed because the original code didn't seem to work.
>
> The following questions are just referring to the script, you have posted
> on 7th May: We like to create customized templates for 1.5T sagittal GE
> SPGR scans including a huge number of subjects (at least 200 in each
> group).
> For some reasons the script crashed on this large number of subjects after
> it processed about 90 subjects although it worked fine
> for smaller batches of 30 subjects. The only error message, which came out
> was "ui control callback back error; problems with drawnow.m". I tried to
> run the script without starting spm in the Matlab window, but then it did
> not generate the postscript file. The other issue is that the mean
> calculation time per subject seems to increase with the number of subjects
> and the script is really very slow reaching high numbers of subjects. Is
> there a way of running smaller batches and then averaging the generated
> templates?
This may be because of a memory leak:
http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0304&L=spm&P=R9825&I=-1
As a workaround, you could run it in smaller batches, and then average the
resulting images.
Best regards,
-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
|