Skip to main content

No project description provided

Project description

tiffslide: a drop-in replacement for openslide-python

GitHub issues

Welcome to tiffslide :wave:, a tifffile drop-in replacement for openslide-python.

tiffslide's goal is to provide an easy way to migrate existing code from an openslide dependency to the excellently maintained tifffile module.

We strive to make your lives as easy as possible: If using tiffslide is unintuitive, slow, or if it's drop-in behavior differs from what you expect, it's a bug in tiffslide. Feel free to report any issues or feature requests in the issue tracker!

Development happens on github :octocat:

:warning: :dragon: Here be dragons :dragon: :warning:

This is an early release version, so expect things to break. In its current incarnation we are targeting support for Aperio SVS but contributions to expand to a larger variety of fileformats that tifffile supports are very welcome :heart:
If there are any questions open an issue, and we'll do our best to help!

Documentation

tiffslide's behavior aims to be identical to openslide-python where it makes sense. If you rely heavily on the internals of openslide, this is not the package you are looking for. In case we add more features, we will add documentation here.

# directly
from tiffslide import TiffSlide
slide = TiffSlide('path/to/my/file.svs')

# or via its drop-in behavior
import tiffslide as openslide
slide = openslide.OpenSlide('path/to/my/file.svs')

A nice side effect of using tiffslide is that your code will also work with fsspec:

import fsspec
from tiffslide import TiffSlide

with fsspec.open("s3://my-bucket/file.svs") as f:
    slide = TiffSlide(f)
    thumb = slide.get_thumbnail((200, 200))

Development Installation

  1. Install conda and git
  2. Clone tiffslide git clone https://github.com/bayer-science-for-a-better-life/tiffslide.git
  3. Run conda env create -f environment.yaml
  4. Activate the environment conda activate tiffslide

Note that in this environment tiffslide is already installed in development mode, so go ahead and hack.

Contributing Guidelines

  • Please follow pep-8 conventions but:
    • We allow 120 character long lines (try anyway to keep them short)
  • Please use numpy docstrings.
  • When contributing code, please try to use Pull Requests.
  • tests go hand in hand with modules on tests packages at the same level. We use pytest.

You can setup your IDE to help you adhering to these guidelines.
(Santi is happy to help you setting up pycharm in 5 minutes)

Acknowledgements

Build with love by Andreas Poehlmann and Santi Villalba from the Machine Learning Research group at Bayer.

tiffslide: copyright 2020 Bayer AG, licensed under BSD

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

tiffslide-0.2.0.tar.gz (673.5 kB view hashes)

Uploaded Source

Built Distribution

tiffslide-0.2.0-py3-none-any.whl (13.9 kB view hashes)

Uploaded Python 3

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