Support homeXenium Onboard AnalysisAlgorithms Overview
Image Processing Algorithms

Image Processing Algorithms

Image processing begins by mapping known physical features on the glass slide surface (fiducials) to set the image coordinate system. The instrument then identifies the upper bound of the tissue section to find the location of the first Z-slice. These pieces of information collectively determine the range of Z-slices to image. This process has been robust to all tested sections and tissue types.

The DAPI image process produces a complete 3D morphology image (the morphology.ome.tif output file) for each of the stained regions and determines the reference image volume that cells are segmented from and decoded transcripts are assigned to.

First, the lens distortion in internal sensor data is corrected. This is done computationally based on instrument calibration data, which are collected in order to characterize the optical system and are saved on-instrument. Next, the Z-stacks from internal sensor data (0.75 µm step size) are further subsampled to a 3 μm step size. This subsampling step size was determined empirically to be a useful resolution for cell segmentation quality.

Shared image features are then extracted from the regions where FOVs overlap. Feature matching is performed to estimate the offsets between adjoining FOVs. The offsets are used to ensure consistent alignment across the image (global alignment).

Finally, the 3D DAPI image volumes (Z-stacks) generated across FOVs are blended together to construct a stitched volume that is used for nucleus segmentation.

The DAPI and multi-tissue stain image processes produce 2D projections for each image stain (output in the morphology_focus/ directory). The DAPI focus image is based on the DAPI image captured in cycle 1. The multi-tissue stain images are captured in later cycles as described below.

This algorithm step is only compatible for tissues prepared with the Multi-Tissue Stain Mix following the Cell Segmentation Staining workflow (see CG000749 or CG000760).

Two cycles are added to the on-instrument analysis workflow to image the cell membrane boundary stains and interior cell stains. These occur after the RNA imaging cycles.

  • First added cycle captures DAPI and the other three channels in a blank state.
  • Second added cycle captures DAPI and the other three channels with their respective stains present.

The DAPI images from these additional two cycles are then aligned to the cycle 1 DAPI image so they are in the same coordinate system. Next, the background "blank" images are subtracted from the stain images for each of the multi-tissue stain channels, which helps to offset the effects of autofluorescence. Background subtraction is only performed for the multi-tissue stain images, not the DAPI image.

In XOA v3.0, background thumbnail images are displayed in the analysis_summary.html Image QC gallery and downsampled images are available in the aux_outputs/ directory.

This algorithm step is based on multi-focus image fusion techniques* to generate an all-in-focus stitched, 2D projection for each of the stain images (boundary, interior RNA, interior protein; and/or DAPI). It includes the following steps:

  • In 64 x 64 pixel patches, the algorithm selects the best in-focus Z-slice from the stain image Z-stack, which has a 0.75 µm step size. This process is applied to every FOV selected for analysis.
  • The results are stitched together to generate a 2D projection image for each stain. These are provided in the Xenium Onboard Analysis output bundle as multi-file OME-TIFF files, one per channel, in the morphology_focus/ directory. It will contain the nuclei DAPI stain image, as well as three additional stain images for Xenium outputs generated with the multimodal cell segmentation assay workflow.

*Review articles such as this one provide some background information about multi-focus image fusion methods.

The goal of RCA product image processing is to detect and filter puncta and correct distortion. Performed for every channel and cycle, the 3D image volumes (Z-stacks) obtained for each FOV are processed to detect the puncta in 3D space that correspond to labeled RCA products. Images are currently captured in four color channels and n cycles.

The RNA fluorescence image is scanned for punctum signals that stand out from the local background. The XYZ coordinates of each punctum are refined by examining local brightness. The signal intensity of the punctum is determined based on a fitted shape. Xenium Analyzer instrument-specific calibrations are made to adjust the optical system’s point spread function (PSF) model. This calibration enables increased detection and localization of puncta in transcript-dense regions and near the edges of FOVs, effectively minimizing FOV-related artifacts like roll-off.

Next, the pipeline filters out puncta that are unlikely to be true transcripts (non-punctate or low quality signals). Similar to DAPI images, curvature distortion is corrected.

Back to algorithms overview