Metadata-Version: 2.5
Name: stainnormprogram
Version: 1.0.0
Summary: A program that does stain normalization.
Project-URL: Documentation, https://github.com/peterhsu-uiuc/StainNormProgram#readme
Project-URL: Issues, https://github.com/peterhsu-uiuc/StainNormProgram/issues
Project-URL: Source, https://github.com/peterhsu-uiuc/StainNormProgram
Author-email: peterhsu-uiuc <pwhsu2@illinois.edu>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Requires-Dist: bioio
Requires-Dist: bioio-bioformats
Requires-Dist: bitarray
Requires-Dist: colour-science
Requires-Dist: fast-colorthief
Requires-Dist: fastdigest
Requires-Dist: imagecodecs
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: openslide-bin
Requires-Dist: openslide-python
Requires-Dist: pillow
Requires-Dist: plotly
Requires-Dist: pyvips[binary]
Requires-Dist: scikit-image
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: tifffile==2026.6.1
Requires-Dist: zarr
Description-Content-Type: text/markdown

# StainNormProgram

**StainNormProgram** is a program that performs stain normalization, assessment, and correction.

## Background

Stain normalization transforms the color distribution of stained tissue images. The process of staining biological tissues with dyes reveals important structures that can be used by clinicians to diagnose patients. However, variability between different hospitals and laboratories creates noise in the appearance of these stains, which may fool machine learning algorithms. Stain normalization aims to reduce such variabilities by converting *source* images with different staining styles into a single staining style, which is computed from a *target* reference. 

StainNormProgram provides the utilities needed to perform stain normalization on whole slide images, tissue microarrays, and tiles. The program supports hematoxylin and eosin (H&E) and immunohistochemistry (IHC) with diaminobenzidine (DAB) chromogen. StainNormProgram provides also provides features for assessing and correcting processed images.

## Getting Started

Supported Python version: 3.14

```
pip install stainnormprogram
```

To learn how to use StainNormProgram, check out the [`tutorials/`](https://github.com/peterhsu-uiuc/StainNormProgram/tree/main/tutorials) folder.

For the API documentation, please see https://stainnormprogram.readthedocs.io/en/latest/.

## Reading Output Images

Stain normalized images outputted by this program can be opened using [Aperio ImageScope](https://www.leicabiosystems.com/us/digital-pathology/manage/aperio-imagescope/) or [tifffile](https://github.com/cgohlke/tifffile).

## Citation

```
@software{stainnormprogram,
    author = {Hsu, Peter and Falahkheirkhah, Kianoush and Bhargava, Rohit},
    title = {StainNormProgram},
    year = {2026},
    publisher = {GitHub},
    version = {1.0.0},
    url = {https://github.com/peterhsu-uiuc/StainNormProgram"}
}
```

Built at the University of Illinois Urbana-Champaign. Support for this project was provided by the National Science Foundation Graduate Research Fellowship Program.
