You'll want to do something like this:
mask = spm_select(mask.img);
[TabDat savename] = spm_VOI(SPM,xSPM,mask);
This should output the table for only your mask. If you have a bunch of
different masks, you can throw them all in one directory and loop
through. I use the 'diary' function in matlab and spm_list to save the
table in a text file. You would do:
diary([SPM.swd savename '.txt'])
spm_list('TxtList', TabDat, 1);
diary off
Chris
Paloyelis, Yannis wrote:
>
> Dear SPMers,
>
>
>
> I use a script to obtain Results (second level group analyses).
> However the script produces results for the whole brain, while I would
> like to run results for a particular predefined area (I have produced
> a mask which defines it). Using the GUI, I can do that after running
> Results by loading the mask using small volume correction. Or I can
> incorporate it in the Results process using the pickatlas tool. I
> would like though to do it by script (large numbers!) - would anybody
> know which commands I should include in the script so as to obtain
> Results for my ROI only (with the corrected stats of course)?
>
>
>
> Script example:
>
>
>
> for j = 1:length(SPM.xCon)
>
> jobs{1}.stats{1}.results.conspec.contrasts = [j]
>
> jobs{1}.stats{1}.results.conspec.threshdesc = 'none'
>
> jobs{1}.stats{1}.results.conspec.thresh = 0.001
>
> jobs{1}.stats{1}.results.conspec.extent = 10
>
>
>
> save jobFileResults.mat jobs
>
> clear jobs
>
> load jobFileResults
>
> spm_jobman('run',jobs)
>
> end
>
>
>
> Thanks very much for your help,
>
>
>
> Yannis
>
> * ____________________________ *
>
> Yannis Paloyelis, MSc
>
> PhD student
>
> MRC SGDP Centre
>
> Institute of Psychiatry
>
> King's College London
>
> De Crespigny Park (P080)
>
> London SE5 8AF
>
> tel: +44 (0)20 7848 5403
>
> fax: +44 (0)20 7848 0866
>
> http://SGDPDept.iop.kcl.ac.uk <http://sgdpdept.iop.kcl.ac.uk/>
>
>
>
>
>
|