Work in progress


Open slidebook .sldy files in Python

To install

slidebook-python requires Python >= 3.9

pip install slidebook-python

To use

from sld import SlideBook
sld = SlideBook("/path/to/file.sldy")

# How many acquisitions
# 4

# How many channels in first acquisition

# Get data from channel 0 of the second acquisition
data = sld.images[1].data["ch_0"]

To visualise in napari

N.B. napari plugin is in development

import napari
import numpy as np
from sld import SlideBook
sld = SlideBook("/path/to/file.sldy")
viewer = napari.Viewer()
viewer.add_image((np.squeeze(sld.images[0].data["ch_0"])), name="Channel 0")
viewer.add_image((np.squeeze(sld.images[0].data["ch_1"])), name="Channel 1")

By default, Slidebook will not load image data into memory. To force this, use mmap_mode=None:

sld = SlideBook("/path/to/file.sldy", mmap_mode=None)


View Github