I found an older message from Stefan Keibel about doing explicit masking in
fMRI models in SPM99, but need some help with it (please respond directly
to [log in to unmask], as I don't get the sent to me). Specifically, he
wrote:
********
With fMRI data/models, SPM99 is fully capable of doing explicit masking,
but the user interface for fMRI doesn't ask for it. One way to do this
type of masking anyway is to specify your model, choose 'estimate later'
and modify (in matlab) the resulting SPMcfg.mat file. (see spm_spm.m
lines 27 - 39 and 688 - 713). Load the SPMcfg.mat file, set the xM.TH
values all to -Inf, set xM.I to 0 (in case that you have an image format
not allowing NaN). Set xM.VM to a vector of structures, where each
structure element is the output of spm_vol. For instance:
xM.VM = spm_vol('Maskimage');
Finally, save by
save SPMcfg xM -append
********
Thus, I assume that the following goes into matlab:
clear
load SPMcfg.mat
xM.TH= -Inf
xM.I= 0
xM.VM= spm_vol('Maskimage')
save SPMcfg xM -append
where 'Maskimage' is the actual filename of the mask volume.
However, in typing these commands we get the error report below. What are
we missing? We're not at all sophisticted with Matlab, so I assume that we
may be missing some basic syntax implied above.
Thanks.
David K.
***
Plane 1/68 , plank
1/2 : ...read & mask
data??? Index exceeds matrix dimensions.
Error in ==> C:\Program Files\spm99\spm_spm.m
On line 705 ==> CrLm(CrLm) = Y(i,CrLm) > xM.TH(i,1); %-
Threshold (& NaN) mask
??? Error while evaluating uicontrol Callback.
***
|