Dear SPM developers,
During the estimation of a General Linear Model with SPM2 (function
spm_spm.m, version 2.66), an estimated residual variance image is
computed and saved in '/my directory/ResMS.img'.
The problem is :
- the 'ResMS.img' is created and saved using VResMS structure, with a
scale factor for each plane set to VResMS.pinfo = [1 0 0]' (see lines
510-514 in spm_spm.m)
- the parameters and results structure 'SPM.mat' also contains a VResMS
field, which is the same structure associated to 'ResMS.img' with one
difference : the scale factor for each plane is set to VResMS.pinfo(1) =
1/xX.trRV (see line 845 in spm_spm.m)
It means that reading the same estimated residual variance image
'ResMS.img' will not return the same voxels values Y if I use :
1--> ResMS structure saved in SPM.mat :
>> load SPM ;
>> Y1 = spm_sample_vol( SPM.VResMS, XYZ(1,:), XYZ(1,:), XYZ(1,:), 0 ) ;
(this is the way how the function 'spm_contrasts.m' loads the estimated
residual variance image...)
or 2--> ResMS structure saved in ResMS.hdr
>> V = spm_vol( 'ResMS.img' ) ;
>> Y2 = spm_sample_vol( V, XYZ(1,:), XYZ(1,:), XYZ(1,:), 0 ) ;
The difference between Y1 and Y2 corresponds to the scale factor for
each plane : Y1 / Y2 = 1/xX.trRV...
My questions are :
- is there a reason why these two ways of reading 'ResMS.img' do not
return the same result ? Is there something wrong in the syntax ?
- which is the 'correct' way of reading 'ResMS.img' ?
Thanks in advance for your answer.
S. Meriaux.
PhD Student in CEA/SHFJ/MADIC, Orsay, France.
|