SlideIO Python Wrapper
This repository provides a Python interface to the SlideIO library, a high-performance C++ image-reading framework designed for medical and biological slides. With SlideIO, you can read whole-slide images, extract specific regions, and scale large slides efficiently. The Python wrapper integrates these capabilities into a convenient API, returning image data as NumPy arrays.
License: BSD-3-Clause.
References
Overview
SlideIO is available as:
- A C++ library for efficient reading of whole-slide images, with support for multi-dimensional data (2D, 3D, and time series).
- A Python module that leverages the same C++ codebase, providing a Pythonic interface for reading images into NumPy arrays.
Key features include:
- Whole-slide reading: Load entire slides or specific regions of interest.
- Efficient scaling: Rapidly generate scaled images from large slides using internal zoom pyramids.
- Format flexibility: Handle diverse medical and biological imaging formats through an extensible driver system.
Supported Image Formats
The following table lists the currently implemented drivers and their corresponding file formats:
To learn more about the library and additional features, visit the SlideIO Website.
Building on Linux with the Manylinux Docker Container
Below are instructions for building the Python wheels within a manylinux environment.
-
Clone Repositories
git clone https://github.com/Booritas/slideio-python.git
git clone https://github.com/Booritas/conan-center-index.git
-
Run the Docker Container
Map the parent directory containing these repositories into the container:
docker run --name slideio -it \
-v /path-to-slideio-python-parent-directory:/slideio \
booritas/slideio-manylinux_2_28_x86_64:2.7.0 bash
-
Set Environment Variables
Within the container, point to the cloned repositories:
export SLIDEIO_HOME=/slideio/slideio-python
export CONAN_INDEX_HOME=/slideio/conan-center-index
-
Build Custom Conan Packages
cd /slideio/slideio-python
./conan.sh
-
Install Conan Dependencies
cd /slideio/slideio-python
python3 ./install.py -a conan -c release
-
Build Python Wheels
cd /slideio/slideio-python
./build-wheels-manylinux.sh
-
Locate the Wheel Packages
You can find the resulting wheel files in the wheelhouse
subdirectory of the slideio-python
repository.
Contributing
Please submit pull requests or open issues if you have any suggestions or find any bugs. We welcome contributions from the community to improve the library and its Python bindings.
Enjoy using SlideIO for your medical and digital pathology workflows!