Skip to main content

A plugin to lazily load multiscale whole-slide images with openslide and dask.

Project description


License PyPI Python Version tests

An experimental plugin to lazily load multiscale whole-slide tiff images with openslide and dask.

This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-napari-plugin template.


Step 1.) Make sure you have OpenSlide installed. Download instructions here.

NOTE: Installation on macOS is easiest via Homebrew: brew install openslide. Up-to-date and multiplatform binaries for openslide are also avaiable via conda: conda install -c sdvillal openslide-python

Step 2.) Install napari-lazy-openslide via pip:

pip install napari-lazy-openslide


This plugin tries to be conservative with what files it will attempt to provide a reader. It will only attempt to read .tif and .tiff files that openslide will open and are detected as multiscale (openslide.OpenSlide.level_count > 1). Under the hood, napari-lazy-openslide wraps the openslide reader with a valid zarr.Store where each each pyramidal level is exposed as a separate zarr.Array with shape (y,x,4).

The plugin is experimental and has only been tested with CAMELYON16 and CAMELYON17 datasets, which can be downloaded here.

$ napari tumor_004.tif

Interactive deep zoom of whole-slide image


Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.


Distributed under the terms of the BSD-3 license, "napari-lazy-openslide" is free and open source software


If you encounter any problems, please file an issue along with a detailed description.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for napari-lazy-openslide, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size napari_lazy_openslide-0.2.0-py3-none-any.whl (8.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size napari-lazy-openslide-0.2.0.tar.gz (9.4 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page