lazyslide.pp.score_tissues

Contents

lazyslide.pp.score_tissues#

score_tissues(wsi, scorers=None, num_workers=1, pbar=False, tissue_key='tissues')#

Score tissue regions in the WSI for QC

This is useful to filter out artifacts or non-tissue regions.

Deprecated since version 0.7.2.

Parameters:
wsiWSIData

The WSIData object to work on.

scorersScorer or array of Scorer

Scorer to use for scoring tissue regions.:

  • redness: The redness of the tissue.

  • brightness: The brightness of the tissue.

num_workersint, optional, default: 1

Number of workers to use for scoring.

pbarbool, optional, default: False

Show progress bar.

tissue_keystr, optional, default: ‘tissue’

Key of the tissue data in the shapes slot.

Returns:
None

Note

The scores will be added to the tissues | {tissue_key} table in the WSIData object. The columns will be named after the scorers, e.g. redness, brightness.

Examples

>>> import lazyslide as zs
>>> wsi = zs.datasets.sample(with_data=False)
>>> zs.pp.find_tissues(wsi)
>>> zs.pp.score_tiles(wsi, ["redness", "brightness"])
>>> wsi["tissues"]