


Compress the image data stored in SCENE and OPTICALIMAGE.
[cData,mn,mx] = ieCompressData(data,[bitDepth =16],[mn=min(data(:)],[mx=max(data(:)])
The data are quantized to uint16 (or uint8) spread over the original
range of the data. The range of the data is recorded and stored as
well. The rounding (compression, uint16) formula is generally
cData = uint16 (mxCompress * (data - mn)/(mx - mn));
where mxCompress = 2^bitDepth - 1
The user can either specify the min/max or allow the data min and max
to be used.
If mn > mx, an error is returned.
If mn == mx, cData = uint16 (mxCompress * (data - mn));
When using the data to determine mn,mx and mn==mx, this means that
the return is all zeros.
This compression is inverted in the program ieUncompressData.
See sceneGet, sceneSet for examples of the usage.
Copyright ImagEval Consultants, LLC, 2005.