Dear SPM experts,
I would like to extract the peaks of coordinates within a mask image.
I did it for one subject manually, but it would be more efficient for me to do it by some script.
I have some start for this script (I hope it's good):
matlabbatch{1}.spm.stats.results.spmmat = {'the path to SPM.mat file'};
matlabbatch{1}.spm.stats.results.conspec.titlestr = '';
matlabbatch{1}.spm.stats.results.conspec.contrasts = the contrast number;
matlabbatch{1}.spm.stats.results.conspec.threshdesc = 'none';
matlabbatch{1}.spm.stats.results.conspec.thresh = 0.05;
matlabbatch{1}.spm.stats.results.conspec.extent = 0;
matlabbatch{1}.spm.stats.results.conspec.conjunction = 1;
matlabbatch{1}.spm.stats.results.conspec.mask.image.name = {'the path to MASK.nii,1'};
matlabbatch{1}.spm.stats.results.conspec.mask.image.mtype = 0;
matlabbatch{1}.spm.stats.results.units = 1;
I think the next step will be related to calling the tabDat.dat and go to the higher peaks, but I'm not sure if it's correct and how should I do it.
Do you have any idea (or a script template) how to extracting the highest peaks (or at least all peaks) of coordinates within a mask image (as in the above example)?
Thank you!
Nofar
|