AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗| Status | |
| Package | |
| Meta | |
| Cite |
N-dimensional bioimaging produces data and metadata in various formats, and iohub aims to become a unified Python interface to the most common formats used at the Biohub and in the broader imaging community.
Project status: Active development. iohub is alpha software, and its APIs and file-format support may change between releases.
nd2)Install iohub from PyPI:
pip install iohub
With optional TensorStore support:
pip install "iohub[tensorstore]"
Or install the latest development version:
pip install git+https://github.com/czbiohub-sf/iohub.git
For development setup, see the contributing guide.
To check if iohub works for a dataset:
iohub info /path/to/data/
The CLI can show a summary of the dataset,
point to relevant Python calls,
and convert other data formats to the latest OME-Zarr.
See the full CLI help message by typing iohub or iohub [command] --help in the terminal.
Load and modify an example OME-Zarr dataset:
import numpy as np
from iohub import open_ome_zarr
with open_ome_zarr(
"20200812-CardiomyocyteDifferentiation14-Cycle1.zarr",
mode="r",
layout="auto",
) as dataset:
dataset.print_tree() # prints the hierarchy of the zarr store
channel_names = dataset.channel_names
print(channel_names)
img_array = dataset[
"B/03/0/0"
] # lazy Zarr array for the raw image in the first position
raw_data = img_array.numpy() # loads a CZYX 4D array into RAM
print(raw_data.mean()) # does some analysis
with open_ome_zarr(
"max_intensity_projection.zarr",
mode="w-",
layout="hcs",
channel_names=channel_names,
) as dataset:
new_fov = dataset.create_position(
"B", "03", "0"
) # creates fov with the same path
new_fov["0"] = raw_data.max(axis=1).reshape(
(1, 1, 1, *raw_data.shape[2:])
) # max projection along Z axis and prepend dims to 5D
dataset.print_tree() # checks that new data has been written
For more about API usage, refer to the documentation and the example scripts.
Read a directory containing a TIFF dataset:
from iohub import read_images
reader = read_images("/path/to/data/")
print(reader)
This project is inspired by the existing Python libraries for bioimaging data I/O, including ome-zarr-py, tifffile and aicsimageio. They support some of the most widely adopted and/or promising formats in microscopy, such as OME-Zarr and OME-TIFF.
iohub bridges the gaps among them with the following features:
Read the contributing guide before proposing a change. Participation in iohub is governed by the Contributor Covenant Code of Conduct.
Do not report security vulnerabilities in public issues. Follow our security policy to report them privately.