Articles

Imaging and Analysis with Flying Colors: Part Two

Fri, 12/12/2023 - 8:30am
Mark Clymer, Datacolor Inc., and Jerry Sedgewick, Imaging and Analysis

Image A is the original image saved in the TIFF format. Images B, C and D show progressive destruction of A, as a result of image compression when saving in the JPEG format. Image B was saved as JPEG in Photoshop with a low compression at a setting of 10; Image C was saved at a mid-level compression of 6; and Image D at a high compression level of 1.The dictionary definition that a “picture is a representation of a person or scene” just doesn’t apply to those images produced in scientific research and from clinical specimens. It would be more accurate to describe these images in one word: artifact. Everything we see in histology, pathology and stained biological specimens is artifact.

Image as artifact

Why? Specimen preparation is the first culprit in generating artifacts. Tissue or cells are removed from their natural context; fixed by dehydration, cross-linking, denaturation, or combinations of these; embedded in a suitable medium (i.e. paraffin) for sectioning; scraped, stretched, torn and sliced; heated, cooked and baked; and chemically treated to remove the embedding medium in preparation for staining. Stain recipes and preparations vary by manufacturer, and staining consistency between slides is challenging, even with automated staining processors. Finally, mounting medium and a coverslip are applied to the specimen. In the end, the specimen has little resemblance to the original tissue.

Microscopy technique and digital imaging creates the next barrage of artifacts. Proper Köhler alignment minimizes the introduction of edge and diffraction artifacts. Manufacturer-recommended light and filter settings should be followed (see Imaging and Analysis with Flying Colors, Part One) and one general recommendation is to match the condenser aperture setting with the Numerical Aperture value of the objective. Even subtle deviation in settings between objectives or microscope sessions can result in artifacts.

Camera or scanner acquisition software may introduce yet more artifacts. Manual settings allow for greater control of exposure, white balancing, gamma, contrast and other settings on a per-image basis, but often must be adjusted by eye. Automatic settings provide better reproducibility between images, but the algorithms cannot account for all of the variability between specimens, so additional adjustments may be required. All adjustments introduce variability and exaggerate existing artifacts.

Saving images

Perhaps the greatest contribution to the creation of artifact occurs when saving images. In order to reduce file size and, therefore, storage capacity, images are often saved in the JPEG format. The JPEG compression method groups pixels together into blocks in order to reduce image size, a method referred to as “lossy compression.” Pixel groupings may be adjusted in acquisition software to varying degrees and according to strengths that are, unfortunately, inconsistently labeled among manufacturers. Choosing a high compression (or greater strength of compression) results in greater loss of image detail, whereas a minimal strength, when available, may result in compression that is difficult to discern by eye (see Figure 1). JPEG compression introduces the artifact of undersampling by averaging samples together, essentially “throwing away” pixels, and pixels values are scientific data. The solution: save scientific images in the manufacturer’s format (preserves data, offers option for future export of images to other formats), or save in a non-lossy format such as TIFF to preserve pixel fidelity.

Managing artifacts

Images A, B and C show inconsistent images taken on a microscope using the Auto setting for exposure and white balancing. Images D, E and F show A, B and C after post-processing using the ChromaCal method to make images consistent. Inset images (A inset, B inset, E inset and F inset) are enlarged areas shown by boxes on A and B. Images below A, B, C and D, E, F show nuclei (in red) after using a color select method for finding bluish nuclei. Image A inset includes selection of non-specific areas, whereas Image D inset does not (see arrows).Image B inset and C show extraneous inclusion of areas, whereas E inset and F do not (see arrows).With so much potential to introduce artifact, which in turn degrades the integrity of the image, there must be some way to control for the introduction of artifact and even manage them once they do occur.

Standard operating procedures (SOPs), when properly written and implemented, certainly improve consistency of performance, which leads to reproducibility of results. Automated instrumentation significantly contributes to consistent performance especially when that equipment is well maintained and calibrated. But even with proper controls, SOPs and automated strainers for example, inconsistency in color and staining intensity may be unsolvable due to pigment depletion in the stain or variation in manufacturers’ recipes for the stains.  

The imaging process itself can add insult to injury. Here, the insult is variability among images or, to put it another way, a lack of consistency. Again, an SOP could establish and promote best practices for using both the microscope and camera system. However, as with specimen preparation, some artifacts cannot be controlled.  It is often impossible to achieve the same exposure, color rendition and white balance from image to image, according to “An Innovative Method for Obtaining Consistent Images and Quantification of Histochemically Stained Specimens,” in publication.

Post-processing to manage artifacts

Even with SOPs and automated instrumentation in place, the ultimate means for managing artifacts may in fact be post-processing of images. Post-processing can correct for many artifacts that arise from specimen preparation, incorrect microscope settings, and camera systems. Post-processing may also assist in matching images in terms of color rendition, contrast, brightness level, and neutrality of white areas to make images consistent, and therefore comparable. When matching images, other images are adjusted to match the characteristics of an ideal or target image; the target image is selected according to previously determined set of criteria such as minimal artifacts or most “accurate” color, as based on perception and experience.

In fact, the target image may also be a moving target. In histology and among pathologists, no commonly agreed upon norm has been established for images of various stains. Even the most commonly used stain, Hematoxylin and Eosin (H&E), has no norm for stain appearance in various tissue types. Thus, post-processing adjustments are at best subjective in disciplines where objectivity is not only desired, but also expected.

In the absence of a norm, images may be calibrated to a known set of colors. Widely used in photography, graphic arts, paint and textile industries, calibration targets with several color and grayscale “patches” are imaged, and that image is used to align colors from other images. This approach is employed by Datacolor ChromaCal, which combines a color calibration slide (e.g. known set of colors), post-processing software and monitor calibration to align entire sets of images to a consistent standard and ensure proper color rendering on the display device for image visualization.

Consistency and analysis

While it’s important to control artifacts, it is crucial to do so for computer-aided image analysis. Measurements from images for counts, area, length and so on, require some means for separating stained elements of the image from surrounding tissue or background, what is referred to as “segmenting.” Image segmenting is often accomplished by setting a tone or color threshold range above, below, or beside which all tones/colors are chosen. Consistency in color and tonal range between images for comparison ensure that the threshold value is also consistent. Alternatively, when images are variable, the threshold value is also variable, and may require user intervention to manually set the threshold value (see Figure 2). Inconsistent images would, therefore, rely on subjective judgments by the user in order to render comparable threshold values image by image.

Measurements from images also rely upon pixel sampling. Undersampling and grouping of pixels when saved as highly compressed JPEGs makes measurement nearly impossible. Data retention within pixels is a necessary ingredient in making images consistent and free of compression artifacts.

Objectivity or else

Consistency is tantamount for objectivity. When images are a collection of artifacts, greater effort must be put toward controlling and managing artifacts to make images consistent. With proper diligence all along the imaging workflow, from specimen preparation through image processing and image analysis, consistent and comparable images can be obtained and evaluated objectively. Science relies on objectivity, free of bias, otherwise what are you really reporting?

 

 

Share this Story

X
You may login with either your assigned username or your e-mail address.
The password field is case sensitive.
Loading