https://github.com/astrazeneca/napari-wsi
A plugin to read whole slide images within napari.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Repository
A plugin to read whole slide images within napari.
Basic Info
- Host: GitHub
- Owner: AstraZeneca
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 4.47 MB
Statistics
- Stars: 21
- Watchers: 4
- Forks: 2
- Open Issues: 1
- Releases: 10
Metadata Files
README.md
napari-wsi
A plugin to read whole-slide images within napari.
Installation via pip
You can install napari-wsi via pip:
bash
pip install "napari-wsi[all]>=1.0"
This automatically installs all optional backends, as a shortcut for:
bash
pip install "napari-wsi[openslide,rasterio,wsidicom]>=1.0"
In addition, to be able to read images using the openslide backend, it is
required to install the OpenSlide library itself, for example by installing the
openslide-bin python package (also via pip).
Installation via conda
You can also install napari-wsi via conda:
bash
conda install -c conda-forge "napari-wsi>=1.0"
This already installs all optional dependencies, including OpenSlide.
Description
This napari plugin provides a widget for reading various whole-slide image formats using a common zarr store inteface, based on the libraries openslide, rasterio, and wsidicom.
Quickstart
After installation, open the Plugins menu in the viewer and select
WSI Reader to open the widget. Then select a Backend to use, select a Path
to open, and click Load.

If sRGB is selected in the Color Space menu and an ICC profile is attached
to the given image, a transformation to this color space will be applied when
the image data is read. Otherwise, the raw RGB image data will be displayed.
This plugin can also be used to open image files via drag and drop into the
viewer window. The file suffixes '.bif', '.ndpi', '.scn', '.svs' are registered
with the openslide backend, while the suffixes '.tif' and '.tiff' are
registered with the rasterio backend. These files can also be opened directly
from the command line or from a python script:
bash
napari CMU-1.svs
```python from napari import Viewer
viewer = Viewer() viewer.open("CMU-1.svs", plugin="napari-wsi") ```
It is also possible to use the different backend classes directly, in which case some more features are available, for example:
```python from napari import Viewer from napari_wsi.backends.openslide import OpenSlideStore
viewer = Viewer()
Display the image in the sRGB color space and a physical coordinate system:
store = OpenSlideStore("CMU-1.svs", colorspace="sRGB") (layer,) = store.toviewer(viewer, spatialtransform=True) assert layer.metadata["colorspace"] == "sRGB"
Display a scale bar to indicate milli- or micrometers, depending on the zoom level:
viewer.scalebar.visible = True viewer.scalebar.colored = True ```
```python from napari import Viewer from napari_wsi.backends.wsidicom import WSIDicomStore from requests.auth import HTTPBasicAuth from wsidicom import WsiDicomWebClient
viewer = Viewer() client = WsiDicomWebClient.createclient("...", auth=HTTPBasicAuth("...", "...")) store = WSIDicomStore(client=client, studyuid="...", seriesuids="...") store.toviewer(viewer) ```
The sample images used above are part of the OpenSlide test data (see Aperio and DICOM).
Known Issues & Other Notes
- This plugin is prototype research software and there may be breaking changes with each release of the plugin, which is also the case for current releases of the napari viewer itself.
- The
wsidicombackend supports loading annotations together with the image data. However, this may take several minutes, depending on the number and complexity of the annotations. When loading more than a few thousand polygon annotations, make sure that the experimental "triangles speedup" setting is enabled.
Owner
- Name: AstraZeneca
- Login: AstraZeneca
- Kind: organization
- Location: Global
- Website: https://www.astrazeneca.com/
- Repositories: 33
- Profile: https://github.com/AstraZeneca
Data and AI: Unlocking new science insights
GitHub Events
Total
- Create event: 9
- Issues event: 7
- Release event: 4
- Watch event: 4
- Delete event: 4
- Issue comment event: 2
- Push event: 12
- Pull request review event: 4
- Pull request review comment event: 4
- Pull request event: 10
- Fork event: 1
Last Year
- Create event: 9
- Issues event: 7
- Release event: 4
- Watch event: 4
- Delete event: 4
- Issue comment event: 2
- Push event: 12
- Pull request review event: 4
- Pull request review comment event: 4
- Pull request event: 10
- Fork event: 1
Packages
- Total packages: 1
-
Total downloads:
- pypi 57 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 9
- Total maintainers: 1
pypi.org: napari-wsi
A plugin to read whole-slide images within napari.
- Documentation: https://napari-wsi.readthedocs.io/
- License: apache-2.0
-
Latest release: 1.2.1
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- dask >=2022
- imagecodecs >=2022
- magicgui 0.*
- matplotlib 3.*
- napari 0.4.*
- numpy 1.*
- pydantic !=1.10.0
- python >=3.8, <3.11
- rasterio 1.*
- tifffile >=2022
- zarr 2.*
- 165 dependencies