No project description provided
Project description
tiffslide: a drop-in replacement for openslide-python
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
- Install conda and git
- Clone tiffslide
git clone https://github.com/bayer-science-for-a-better-life/tiffslide.git
- Run
conda env create -f environment.yaml
- 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 usepytest
.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tiffslide-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cce2f50685b1ff8021afa68803a3f9021ad23199c5b2877df864d83798cbaf7 |
|
MD5 | aa0c01c30c58b3e43e162e65463a512e |
|
BLAKE2b-256 | d7748be16aac9c4ec0af58a98b751e8687b397b9d7712c55d3cc6cd29a551b0d |