Open slidebook .sldy files in Python
Project description
Work in progress
slidebook-python
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
print(sld.number_acquisitions)
# 4
# How many channels in first acquisition
print(sld.images[0].num_channels)
# 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")
napari.run()
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)
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
Close
Hashes for slidebook-python-0.0.3rc0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76ac4aed224d8c3970584f9e4cd07b25467489ef38854c7d1e2bfee4eedadc9b |
|
MD5 | cbebdfcf5f70f39442e4cdfa579197d6 |
|
BLAKE2b-256 | b9a2b634cd44bebd71d4a6f0f98bbaede5b3d51e80d85f9be49cc04a00e16646 |
Close
Hashes for slidebook_python-0.0.3rc0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 801cc9df73757d4b1f26a4a2194e34dcde5fab0de8f607f5ca146db523902244 |
|
MD5 | b72bbd1689496c9aec35f1156584adb7 |
|
BLAKE2b-256 | fbddbc89a8c2cd64561eee24f238513488447aae93beafa27d824710ebc83e28 |