Dear mailbase,
I don't quite understand how SPM encodes negative voxel values in integer
datatypes (say TYPE 2 (uint8) and TYPE 4 (int16)) in Analyze format files
(*.img/*.hdr).
Specifically, true voxel values are rescaled so they can "fit" into the
maximum and minimum values allowed by the datatype. SPM seems to do this
with a single scaling value, SCALE (in the analyze header, this is
"roi_scale" or "funused1"). But what if some uint8 image has positive *and*
negative values? Given that the datatype runs from 0 to 255, I don't quite
understand the encoding via the single scalar SCALE. Similarly, tracing
through the code in SPM99, when writing out an int16 image, spm seems to
consider the maximum value in the volume, then scales things down by
max/maxval, where max is the image maximum and maxval is 2^15 - 1. But what
if the minimum value of the image is negative and has a larger absolute
value than the maximum?
Is the answer to these questions "the only way SPM will encounter negative
image values anyway is after *statistical* processing, and any *output*
image with negative values (say, in a statistical image) will be output as a
*.mat file"?
Best wishes,
Stephen Fromm, PhD
NIDCD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|