Hi Drew,
On 19/12/13 15:41, Sevel,Landrew S wrote:
> Hello all,
>
> I'm trying to write a script using the VOI tool but am having difficulty
> finding the correct code to mask with an image rather than a contrast.
>
> This is what I've come across for a contrast:
>
> matlabbatch{1}.spm.util.voi.roi{1}.spm.mask.contrast =
> matlabbatch{1}.spm.util.voi.roi{1}.spm.mask.thresh =
> matlabbatch{1}.spm.util.voi.roi{1}.spm.mask.mtype = 0; % inclusive
>
> What would the correct fields be to replace with an image?
To intersect an SPM with a mask, you would do this:
matlabbatch{1}.spm.util.voi.roi{1}.spm.spmmat = {''};
matlabbatch{1}.spm.util.voi.roi{1}.spm.contrast = 1;
matlabbatch{1}.spm.util.voi.roi{1}.spm.threshdesc = 'FWE';
matlabbatch{1}.spm.util.voi.roi{1}.spm.thresh = 0.05;
matlabbatch{1}.spm.util.voi.roi{1}.spm.extent = 0;
matlabbatch{1}.spm.util.voi.roi{2}.mask.image = {'/path/to/mask.nii'};
matlabbatch{1}.spm.util.voi.roi{2}.mask.threshold = 0.5;
matlabbatch{1}.spm.util.voi.expression = 'i1 & i2';
> Additionally, is it possible to move the VOI center to be the global max of the resulting image before eigenvariate calculation? If so, how?
Then you might want to do this:
matlabbatch{1}.spm.util.voi.roi{1}.spm.spmmat = {''};
matlabbatch{1}.spm.util.voi.roi{1}.spm.contrast = 1;
matlabbatch{1}.spm.util.voi.roi{1}.spm.threshdesc = 'FWE';
matlabbatch{1}.spm.util.voi.roi{1}.spm.thresh = 0.05;
matlabbatch{1}.spm.util.voi.roi{1}.spm.extent = 0;
matlabbatch{1}.spm.util.voi.roi{2}.mask.image = {'/path/to/mask.nii'};
matlabbatch{1}.spm.util.voi.roi{2}.mask.threshold = 0.5;
matlabbatch{1}.spm.util.voi.roi{3}.sphere.centre = [0 0 0];
matlabbatch{1}.spm.util.voi.roi{3}.sphere.radius = 8;
matlabbatch{1}.spm.util.voi.roi{3}.sphere.move.global.spm = 1;
matlabbatch{1}.spm.util.voi.roi{3}.sphere.move.global.mask = 'i2';
matlabbatch{1}.spm.util.voi.expression = 'i1 & i2 & i3';
Best wishes,
Guillaume.
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|