SLDC is a Python library that aims at accelerating development of large images analysis workflows. SLDC-OpenSlide is a Python binding for using SLDC with the OpenSlide image library. In practice, it enables workflows to process large images stored locally on disk.
- Install SLDC: https://github.com/waliens/sldc
- Install OpenSlide and openslide-python: https://github.com/openslide/openslide-python
- Install SLDC-OpenSlide:
- Clone or download the repository
- Move to the root folder
- Install:
python setup.py install
- Test your install:
python -c "import sldc_openslide"
SLDC-OpenSlide provides mostly two classes:
OpenSlideTileBuilder
: a builder that builds tiles using anOpenSlideImage
as parent image. This is the tile builder that must be passed to the builder at the workflow construction.OpenSlideImage
: adaptsOpenSlide
class to match SLDCImage
interface. This is theImage
object that must be passed to theprocess
method of your workflow.
Note: Any instance of OpenSlideImage
hold a file resource which must hence be released when the image is not needed anymore. You can either explicitely close the resource by calling image.close()
or by using a context manager. In both case, the instance image
cannot be used anymore after being closed, otherwise resulting in undefined behavior.