Loading...
 

Image Clipping



Image clipping occurs when measured intensities fall outside the range that the digital data format can save. In practice that means that the highest intensities, which are often of most interest, are not saved properly and usually converted to the maximum value that can be saved. This information in the high intensities regions is then irreversibly lost and corrupted.

The image to the right shows a dendritic shaft, in which all the inner regions are saturated to the maximum value, and the internal structure can no longer be observed. The intensity plot across the red line shows that the values in the dendritic shaft are capped at a plateau, and the original values can not be reconstructed.

Clipping is one of the most frequently occuring imaging acquisition pitfalls. Clipped images can severly hinder deconvolution by causing artifacts and limiting the reliability of the SNR estimation.
Although it is easy to detect clipping in the Huygens software, it can never be restored. The only thing you can do in these situations is to omit clipped regions from the analysis.

ThomasChater Neuron MIP Dendrzoom+intensity2
Left panel shows a zoom of a dendritic shaft, the intensity plot in the righ panel is created over the red line. Original image courtesy of Dr. T.E. Chater, RIKEN Brain Science Institute, Wako, Japan. The image shows the detailed structure of dendritic spines of dentate granule cells. The cell in the image expressed GFP to act as a cell fill and was imaged live using a confocal microscope.


Clipping is information loss


The loss of the highest intensities in your image due to clipping is comparable to taking a picture of a mountain but leaving its top out of the image: you can not say any longer what was its real shape, or its real size, just by inspecting the imaged lower part. What is the real profile of this mountain?

Clipping Mountain New 3x V3


Detecting clipping using histograms

Clipping Good+bad Histogram
Two histograms, the left panel shows a distribution of intensities going to zero, the right panel shows the clipped voxels summed into the highest intensity bin. In the histograms, intensities stored in the image file are represented as bins on the X-axis. Each bin represents a range of intensity values. The Y-axis shows the frequency of each bin, and is scaled logarithmically.

Histograms can be used to detect clipping in images. The image to the left shows two histograms: in the left histogram the distribution of intensities goes down to zero. The right histogram has a sharp peak at the maximum intensity at the left, this reveals the higher intesities are clipped. The image orginally contained higher intensities that fell outside of the highest histogram bin. Therefore, these intensities are summed into the maximum intensity bin causing the sharp spike. Because of the logaritmic scaling of the frequencies (Y-axis), the clipped voxels in the last bin look twice as abundent as some of the other high intensity bins, but this is in fact 1000 times higher! Therefore, always be suspicious if you find values at the extremes in your image, in that case probably clipping occurred.


Clipping causes and prevention

Clipping can be caused by either your sample giving intensity values outside the minimum and maximum of the detector of your microscope, or by converting data into a file with a lower dynamic range.

Clipping on the detector

Clipping on the detector can be seen as saturation of the microscope detector. On the detector, the light intensities are detected in an analogue way. The dynamic range is a property of the detector and refers to the minimum and maximum intensities that can be detected simultaneously. To translate this information to an image, the analogue signal is converted to electrical signals by an analogue-to-digital (AD) converter. The AD converter has a bit-depth (usually 8-bit or 12-bit), that describes over how many gray-values the analogue signal is distributed. Clipping occurs when the bit-depth of the AD converter is smaller then the dynamic range.


In microscopes equipped with a CCD sensor the AD conversion is done in the CCD camera and its electronics. Most modern CCD cameras have a 12-bit AD converter limiting the output numbers to a range of 0 to 4095. Clipping occurs when the bit-depth of the AD converter is smaller then the dynamic range. All intensities are crammed into the 0 to 4095 range, losing information from the image.

Another cause of clipping on the detector is the case of negative input values. Depending on the detector, intensities are either be measured as a negative to positive value, or only positive values. When the AD converter turns these values into numbers, errors can occur. Negative input signals are usually converted to 0 while positive input values exceeding some value are all converted to 4095 (clipping), causing loss of information from the image.

To retain all information from the sample, it is important that all intensities can be detected. Therefore, for fluorescence microscopy, a wide dynamic range is needed. It is possible to change how light intensities are amplified on the detector by changing the gain setting. Increasing the gain will decrease the dynamic range. The gain describes the amplification of the signal by the detector, before AD conversion. The gain determines how many photons per pixel it takes to get the maximum intensity in that pixel. By increasing the gain, you decrease the amount of photons it takes for a pixel to be saturated. Thus, by setting a higher gain, low intensities from the sample will give higher values. If the gain is set too high, the pixels on the detector can be oversatured resulting in clipping! To prevent clipping use proper offset and gain settings. Most microscope acquisition software packages have a tool that can help you to determine the most optimal settings. This tool is often referred to as the "Range Indicator" or "Color range indicator".
Schematic Clipping On Detector2
The microscope detector (i.e. CCD camera) records photons coming from the sample on light sensitive elements, the pixels. Each pixel will convert incoming photons into electrons, forming an electrical signal. This electrical signal is then converted into a grey-scale value by the analogue-to-digital converter. The higher the bit-depth of the AD converter, the higher the range of available grey-scales is.


Clipping during data processing or conversion

Aside from clipping during image acqusition, clipping can also occur during data processing when you store data using a file format with a lower dynamic range without downscaling properly. For example, if you save a 12 bit image in a 8 bit RGB TIFF format directly, all intensities above 255 will be clipped. Therefore, be carefull when converting between different file formats and make sure to always convert to a format that supports the same dynamic range or larger.

Clipping due to conversion between different file formats can be solved with the Huygens software. When the chosen file extension implies fewer bits than those of the image, for example saving a 32 bit image to a 16 bit file, the Huygens software will prompt for a conversion method choice: Contrast stretch, Linked scale or Clipping. Contrary to clipping, Contrast stretch and Linked scale will preserve the information in the image.
tiffScaling.png

Contrast stretch redistributes the range of intensities to fit the amount of bins of the chosen file. The minimum and maximum value of the original are set as the minimum and maximum in the new range. All intensities in between are then scaled to fit between the new minimum and maximum. This is done for each channel individually, thus losing the relative difference in intensity between channels!
Linked scale acts the same as contrast stretch, but uses the minimum and maximum from the channel with the lowest or highest intensities. This keeps the relative intensity differences between channels.

Effect of clipping in deconvolution

Clipping negatively affects deconvolution in several ways. If you were using averaging in a scanning microscope, clipping might also have occurred in some of the samples prior to the (digital) averaging. By averaging potential clipping of high signal of individual scans may be masked. This leads to a quenching-like effect and less effective deconvolution. Therefore, it is recommended to use photon counting or accumulation mode over averaging.

Clipped images cause artifacts

Below is a practical example of how clipping can cause artifacts during deconvolution. The restored image was deconvolved, however, due to clipping the deconvolved result cannot be trusted. The deconvolved image looks alright, but in the zoomed sections we see that some of the green rab3D puncta are shown as hollow structures. The hollow appearance is probably just an artifact resulting from deconvolving a clipped region. In these objects and others in the surroundings, the original intensities are clipped (saturated) and therefore deconvolution can not find a realistic solution, specially in a single 2D slice. The mathematical solution for deconvolution of such a flattened feature is a hollow object!


Raw image
Example Clipping Raw V2

Deconvolved image
Example Clipping Decon V2

Images courtesy of Dr. J.A. Valentijn, Molecular Cell Biology Dept., Leiden University Medical Center. The raw image was acquired with a Bio-Rad 2100MP confocal/multi-photon system (multi-photon option was not used here). The image was taken from a 7 micrometer thick cryostat section of rat colon tissue that was fixed in 4% paraformaldehyde. The section was labeled with rabbit antibodies against the small GTP-binding protein, rab3D, and secondary Alexa-488 goat anti-rabbit antibodies (green channel), and with Alexa-594 labeled Griffonia simplicifolia II lectin. Each V-shaped fluorescent structure represents the Golgi apparatus of a goblet cell (the mucus secreting epithelial cells in intestine).


Clipping hinders SNR estimation

Additionally, clipping affects deconvolution via a more hidden effect. In order to perfrom deconvolution, the Huygens software estimates the Signal-to-Noise-Ratio (SNR) in your image. Information loss due to image clipping severely hinders the quality of the automatic SNR estimation. The SNR is typically determined using the maximum intensity present in the image. In addition, sharp fluctuations in signal intensities are used to determine the noise. In clipped images, these two components of SNR estimation are both hindered. The highest intensity cannot be determined, as the information on the maximum intensity is lost, and the intensity fluctuation data is incomplete, as the highest intensities are missing. Faulty SNR estimates due to clipping cause in lower quality deconcolution results.