Chicago LSM - Autoscaling Methods

CLSM provides a few methods for image greyscale autoscaling. For each image, two scaling steps are applied.

The first is done by the image acquisition subsystem. During image acquisition and reconstruction (particularly during serpentine scan), all the acquired raw data must be averaged based on scan pattern and averaging settings. Since CLSM is designed for scientific and industrial applications, it is utterly important any scaling operating between the data acquisition hardware and final image will preserve the maximum amount information and be lossless, in some other fields, this is called bit-perfect reproduction. The hardware returns data in I16 format, and CLSM will convert/shift the data to U16 spaces (but in float32 format to preserve more than 16-bit of information from averaging SNR gain) for all subsequent processing. 

The second autoscaling is done in the image display on the GUI. This is to facilitate visual display and subsequent manual histogram adjustment. The images are scaled to U8 space. At this step, the image greylevel will be shrink to (0 - 256) and not in absolute term anymore, to accommodates visual display based on user histogram adjustment. However, we spend extra effort so such when user view the false-color image, the scale bar reflects the true hardware count of luminosity scale. So, what you read on the screen matches what you get in the exported image files. 

CLSM is designed for industrial and scientific application, it is vitally important that the saved image file can reflects the light recorded consistently between each operation and days. For this reason, float32 are used throughout the system until the very least minute before screen display. The data acquisition is at 14-bit on hardware level, with averaging added, the effective resolution can well exceed 16-bit, thus float32 is really necessary to preserve as much information as possible. 

All 16-bit greyscale images either saved by GUI button or via RESTful API calls preserve the absolute greyscale of each pixel. They can be used to track absolute brightness of samples.

The color and 8-bit greyscale images, on the other hand, do NOT preserve the absolute luminosity, partly because of lack of objective criteria to match the ratio between each channel while simultaneously emphasize the differences between each channel in false-color (pseudocolor) image. Thus, all color images are autoscaled based on percentile to (4 - 251). Scaling factor is included in the image meta-data, so user can back calculate the true raw value if needed (future release).

In additional, a per channel video gain option is provided in case user want to calibrate the image pixel reading to their desired units, such as photon counts. However, user need to be aware that, any scale that is greater than 1.0 could cause overflow/clipping in 16-bit image export when strong signal presents (data clipping when hardware is not saturated). It is impossible to both maintain absolute luminosity and free of saturation/clipping. However, in practice, CLSM simply won't see large signal to even trigger clipping, as the targeted users are more likely struggling with too little signal rather than too much. 

Below are options of Autoscaling:

  1. None
    This method taken account of user defined video gain options. 
  2. Shift(I16->U16)
    This method mapped signal with range of (-32768 - 32767) to (0 - 65535).
  3. Scale(I16-U8)
    This methods map (-32768 - 32767) to (0.0 - 255.0) as floating number.
    This method taken account of user defined video gain options. 
    There is also a Scale(U8-U16) option used internally to convert the (0.0 - 255.0) mapped raw data back to (0 - 65535) without loss of information for image export. 
  4. MinMax
    This methods map (min - max) to (0.0 - 255.0). This method is sensitive to noise spikes. The video gain setting is irrelevant in this case, as the results are the same. There is also an option named "ReverseMinMax" used internally in the source code, that convert the (0 - 255) mapped data back to raw readout. It, however, does take account of the video gain setting. 
    The combined MinMax and ReverseMinMax preserve the absolute measurement values. 
  5. Percentile
    This methods has four parameters, including input black point, input white point, output black point, and output white point
    It maps (input black point in percentile, input white point in percentile) to (output black point, output white point). 
    The recommended default parameters are to map (0.01% - 99.99%) to (4.0, 251.0). 
    This method is insensitive to noise spikes, but may have saturation problem on rare extreme bright pixels. 
     The video gain setting is irrelevant in this case, as the results are the same. 
  6. Asinh 
    This is a method that is commonly use in Astronomy. The purpose of this method is to make the bright pixel following a somewhat log scale, but the dim pixels follow a linear scale. Suitable for high dynamic range situation where a large amount of dim objects present with sparse super bright spots. 
    In CLSM, the Asinh method is designed to be black point and linear range gain invariant, which means the black point of the image is constant after the Asinh transform. The signal close to black point that is roughly close to linear scale has its gain maintained after transform. 
    However, to have the black point and low range gain invariant, the black point must be set correctly via setting input black point percentile. 
    Alternatively, the Asinh scaling can be made as total positive range invariant, instead of linear range invariant. This is not included in the standard build, but if any client requests it, we can accommodate it.