Dear Seung-Goo,
the following script might get you started:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear matlabbatch
matlabbatch{1}.spm.stats.results.spmmat = {'SPM.mat'};
matlabbatch{1}.spm.stats.results.conspec.contrasts = 1;
matlabbatch{1}.spm.stats.results.conspec.threshdesc = 'FWE';
matlabbatch{1}.spm.stats.results.conspec.thresh = 0.05;
matlabbatch{1}.spm.stats.results.conspec.extent = 0;
matlabbatch{1}.spm.stats.results.print = false;
spm_jobman('run',matlabbatch);
spm_sections(xSPM,hReg,'structural.nii')
for i=1:size(TabDat.dat,1)
XYZmm = TabDat.dat{i,end};
spm_orthviews('Reposition',XYZmm);
%spm_print;
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Best regards,
Guillaume.
On 16/03/15 11:57, Seung-Goo KIM wrote:
> Dear SPMers,
>
> I wish to have a script that creates thresholded T-maps in orthogonal
> slices with multiple crosshair positions at local peaks of clusters, or
> centroid of clusters.
>
> I found that spm_sections.m create such blob-overlaid orthogonal images,
> and spm_orthviews.m can be used to set a new crosshair position.
>
> But I don’t know how to extract (not via GUI but within a script) the
> coordinates of local maxima that are displayed in the results table.
> This would be very useful to automatically generate result documents.
>
> I presume that information would be in xSPM structure… but I couldn’t
> find cluster-membership information from it.
>
> Thank you for helps in advance.
>
> Best regards,
> --
> Seung-Goo KIM
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|