Hi Todd,
I'm not sure I quite understand you, but if you read the images in with:
vol = spm_vol(filename);
img = spm_read_vols(vol);
then img is converted to float64 in Matlab (with the vol.pinfo scaling
factors taken care of properly). Any maths you then do with multiple
images will be in double-precision, and you can write the answer out
in whatever datatype you like by setting e.g.
outvol.dt(1) = spm_type('float64');
before calling spm_write_vol.
Hope that helps,
Ged.
Todd Penney wrote:
> Hello All,
>
> I am trying to calculate the adjusted coefficient of multiple
> determination (Rsq) for the fMRI data I am working with. In order to do
> that, I need the residual sum-of-squares and the total sum-of-squares
> for the fMRI data. The residual sum-of-squares calculations are already
> provided in the ResMS image files that I am fully aware of. The data in
> these image files are float64 (double precision). The input image files
> are in int16 precision, so calculating the total sum-of-squares is
> fruitless because the residuals are in double precision. So this means
> the calculation of the residuals themselves is not simply just
> subtracting the measured pixel intensity (in the original images) from
> the estimated pixel intensity from the design matrix. I need to get the
> format (or units) of the residual sum-of-squares and total
> sum-of-squares to agree so that I may calculate Rsq.
>
> Any suggestions?
>
> Thank you.
>
> Todd Penney
>
|