Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

BaSiCPy: illumination correction

What it does

A microscope does not light its field of view evenly. BaSiCPy calculates, for every channel of every cycle, a flat-field image of that unevenness, so stitching can correct each tile before it is placed in the mosaic.

Parameters

BaSiCPy has no parameters of its own in this pipeline. Two things decide whether it runs:

How it works

Without correction, each tile is brighter in some parts than others, so a stitched mosaic shows seams, and a cell’s measured intensity depends on where in the tile it sat.

BaSiC models a measured tile as the true image times a flat-field (the uneven illumination) plus a dark-field (camera offset and thermal noise). It estimates both from the tiles themselves, without extra reference images. Stacked together, the tiles split into a low-rank part, the shading they all share, and a sparse residual, where the tissue and debris that differ between tiles end up. It improves image quality from as few as five tiles Peng et al., 2017.

A mouse brain mosaic with a grid of seams, the BaSiC decomposition into low-rank and residual matrices, and the corrected mosaic without seams.

(a) A whole-slide mosaic with seams from uneven illumination. (c) The BaSiC workflow: tiles are decomposed into shared shading and a residual. (d) The corrected mosaic. Panels (b) and (e) show time-lapse correction, which this pipeline does not use. Reproduced from Peng et al., 2017, CC BY 4.0.

In this pipeline, BaSiCPy fits only the flat-field; the dark-field file it writes holds no fitted dark-field.

Inputs and outputs. In: the raw tiles of one cycle, as one OME-TIFF (or another Bio-Formats file such as .czi, read tile by tile). Out: two OME-TIFFs per cycle, {sample}_cycle{n}-ffp.ome.tif (flat-field) and -dfp.ome.tif (dark-field), one plane per channel, under preprocessing/illumination/. Ashlar reads them while stitching. See Preprocessing outputs.

Similar tools

BaSiCPy came with the preprocessing half from nf-core/mcmicro. It needs no reference images, which suits data acquired elsewhere.

Read more

Version used:

ModuleToolVersionContainerPaper
BASICPYbasicpy1.2.0-patch5docker.io/labsyspharm/basicpy-docker-mcmicro:1.2.0-patch5Peng et al. (2017)
References
  1. Peng, T., Thorn, K., Schroeder, T., Wang, L., Theis, F. J., Marr, C., & Navab, N. (2017). A BaSiC tool for background and shading correction of optical microscopy images. Nature Communications, 8(1). 10.1038/ncomms14836
  2. Smith, K., Li, Y., Piccinini, F., Csucs, G., Balazs, C., Bevilacqua, A., & Horvath, P. (2015). CIDRE: an illumination-correction method for optical microscopy. Nature Methods, 12(5), 404–406. 10.1038/nmeth.3323