ResearchDiagnostic Pathology · Feb 5, 2026

StainStyleSampler: clustering-based sampling of whole slide image appearances

Silva MMB, Leh S, Weishaupt H
Pathology & Laboratory MedicineDigital Health & AIAdult
Read the full paper free at PubMed Central ↗

Abstract

The appearance of whole slide biopsy images is greatly affected by various factors such as laboratory procedures or the choice of digital slide scanners. The resulting variations in image styles within and across batches of histological images represent one of the major obstacles to the development of generalizable machine learning algorithms. To overcome this challenge, a lot of research has focused on stain normalization and stain augmentation techniques. While such approaches provide effective strategies to reduce stain variation or increase stain invariance, respectively, they typically involve only limited modelling or sampling of the underlying stain style distribution. Tools for a streamlined sampling of different aspects of such a distribution, which would be crucial e.g. for explicitly evaluating machine learning robustness across or with respect to major stain styles, remain largely missing. Here, we present the StainStyleSampler, a toolkit for (i) the exploration and modelling of stain style variations, and (ii) the automated sampling of images or styles capturing the core components of this variation. The tool enables the extraction of various colour features and deconvolved stain components, visualization of such features directly or after dimensionality reduction, modelling of style distributions using binning, clustering, and density mapping, and automated sampling of the most representative reference images. We believe that this software will equip pathologists and computer-scientists with a more versatile set of tools that can substantially aid in both the exploration and sampling of stain variation across whole slide images.

More on this topic

AI in medicine

Subject terms

Humans; Staining and Labeling; Image Processing, Computer-Assisted; Software; Clustering Algorithms; Machine Learning; Image Interpretation, Computer-Assisted; Algorithms

DOI: 10.1186/s13000-026-01752-4 · PubMed: 41645270

Cite this article

Silva MMB, Leh S, Weishaupt H. StainStyleSampler: clustering-based sampling of whole slide image appearances. Diagn Pathol. 2026. doi:10.1186/s13000-026-01752-4

RIS (EndNote, Zotero, Mendeley)BibTeX

Spotted a mistake? Suggest a correction

Top studies every Monday

The week’s key trials and guidelines in your specialties, plus any topics you follow. By email, free.

Get the weekly digest

Similar articles

Research · Diagn Pathol · Aug 8, 2026 · Pathology & Laboratory Medicine, Nephrology

GlomExtractor: a versatile tool for extracting glomerular patches from whole slide kidney biopsy images

Research · Diagn Pathol · Mar 28, 2026 · Pathology & Laboratory Medicine, Gastroenterology & Hepatology

Detection of collagen band-associated regions in H&E-stained colonic biopsies of collagenous colitis patients using superpixel-based feature extraction and neural network classification

Research · Eur Radiol Exp · May 7, 2026 · Radiology & Imaging, Digital Health & AI

Reconstruction algorithms and arm positioning effects on abdominal CT image quality and radiation dose: a phantom study

Research · Eur Radiol Exp · Jun 8, 2026 · Radiology & Imaging, Digital Health & AI

The impact of a novel deep learning reconstruction algorithm on image quality in ultralow-dose CT: a quantitative phantom study

Research · Eur Radiol Exp · Jan 26, 2026 · Radiology & Imaging, Digital Health & AI

Phantom-based performance comparison of two commercial deep learning CT reconstruction algorithms with super- and normal-resolution settings