Dear Maaly,
The residuals time series images are high pass filtered and whitened
(according to the settings of the GLM).
Concerning the difference between SPM.xY.P and SPM.xY.VY: SPM.xY.P
refers to the original input files while SPM.xY.VY refers to the same
files after grand mean scaling. The data read from the latter are the
ones entering the GLM in SPM.
To use a mask in the Volume of Interest batch module you need to save it
to disk first:
mask = spm_atlas('mask',xA,xA.labels(m).name);
mask.fname = 'tmpmask.nii';
mask = spm_write_vol(mask,mask.dat);
and use it like this:
matlabbatch{1}.spm.util.voi.roi{2}.mask.image = {'tmpmask.nii'};
You can indeed use spm_atlas() to compute maximum probability atlases
but for this you need a probabilistic atlas and Neuromorphometrics in
SPM12 is already a maximum probability atlas.
Best regards,
Guillaume.
On 10/08/17 12:07, Maaly Nassar wrote:
> Dear Guillaume
>
> (sorry there was an error in my last message)
>
> Thanks a lot. This is really an effecient way to generate masks compared to generating masks in either FSL and SPM Anatomy toolbox. I did your approach in extracting mask-related RAW data from residual volumes and SPM.mat, but I've few more questions. Here is what I did:
>
> xA = spm_atlas('load','Neuromorphometrics');
>
> for residual volumes I did:
> V = cellstr(spm_select('FPList',glmDir,'^Res\_[0-9]+\.nii$'));
>
> for SPM.mat I did - but I'm not sure if V here is correct????
>
> V = spm_vol(SPM.xY.P); ???
> V = SPM.xY.VY; ????
> then:
> roiMat = zeros(numel(V),numel(xA.labels));
> for m = 1:numel(xA.labels)
> roiName = xA.labels(m).name;
> mask = spm_atlas('mask',xA,xA.labels(m).name);
> roiMat(:,m) = spm_summarise(V,struct('def','mask','spec',mask),@mean);
> end
>
> I'm just wondering if there is a way to use spm_atlas masks in VOI batch (given that its Y is already adjusted for confounds)
>
> matlabbatch{1}.spm.util.voi.roi{2}.mask.image =????????? -> how can I use "mask = spm_atlas('mask',xA,xA.labels(m).name)" here
> matlabbatch{1}.spm.util.voi.roi{2}.mask.threshold = 0.5;
>
> Also, is there a way to generate max probability masks???. I checked V = spm_atlas('maxprob',xA,thresh), but I'm not sure how to integrate it within the above script.
>
> Many Thanks,
>
> Maaly
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|