In medical imaging, pixel values are frequently stored as bytes or shorts, but there is a generally a real value associated with each pixel as well. This real value is obtained by a scale factor and offset associated with each image or image volume. The MINC standard indicates how pixel values should be interpreted.
Image data in the MIimage
variable can be stored as bytes, shorts,
ints (32-bit), floats or doubles. NetCDF conventions use the attributes
MIvalid_range
or MIvalid_max
and MIvalid_min
to
indicate the range of values that can be found in the variable. For
short values, for example, we might have a valid range of 0 to 32000.
To convert these integers to real values, we could use a scale and
offset. However, these values would have to change if the data where
converted to bytes in the range 23 to 228. If we specify an image
maximum and minimum to which MIvalid_max
and MIvalid_min
should be mapped by an appropriate scale and offset, then we can
convert type and valid range without having to change the real maximum
and minimum. To allow the maximum dynamic range in an image, we use
the variables MIimagemax
and MIimagemin
to store the
real maximum and minimum -- these can vary over any of the non-image
dimensions of MIimage
.