Skip to main content

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

Project description

napari-lazy-openslide

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.

Installation

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

Usage

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

Contributing

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.

License

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

Issues

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.

Source Distribution

napari-lazy-openslide-0.2.0.tar.gz (9.4 MB view details)

Uploaded Source

Built Distribution

napari_lazy_openslide-0.2.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file napari-lazy-openslide-0.2.0.tar.gz.

File metadata

  • Download URL: napari-lazy-openslide-0.2.0.tar.gz
  • Upload date:
  • Size: 9.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for napari-lazy-openslide-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4776c66e901a63c5e7afd55ada2278063b57c127cceceefab47063945abbd5f9
MD5 14977fa9a0d9b89033a5410853925452
BLAKE2b-256 a869468a421be59b8f4e141b72e97d01f0738b2c41d23276bda7210ae91b4d5e

See more details on using hashes here.

File details

Details for the file napari_lazy_openslide-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: napari_lazy_openslide-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for napari_lazy_openslide-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40b1fe51cd210b4401845b9eabc4f30ff6c0fec78a3d65e4f10dbc7adfb28df7
MD5 5713042efaa77549a4182a2fd9d23503
BLAKE2b-256 ff38b5c178374a088151f8f01bd57ec37f50b855f9338a0c7cc42213bb9d1ffa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page