iohub

Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata

https://github.com/czbiohub-sf/iohub

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

bioimaging image-metadata ndimensional-arrays ome-zarr ome-zarr-converter python

Scientific Fields

Biology Life Sciences - 40% confidence
Engineering Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata

Basic Info
Statistics
  • Stars: 39
  • Watchers: 5
  • Forks: 10
  • Open Issues: 39
  • Releases: 12
Topics
bioimaging image-metadata ndimensional-arrays ome-zarr ome-zarr-converter python
Created about 3 years ago · Last pushed 4 months ago
Metadata Files
Readme Contributing License Citation

README.md

iohub

PyPI - Python version PyPI - iohub version DOI Docs deployment

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.

Supported formats

Read

  • OME-Zarr (OME-NGFF v0.4)
  • Micro-Manager TIFF sequence, OME-TIFF (MMStack), and NDTiff datasets
  • Custom data formats generated by Biohub microscopes
    • Supported: Falcon (PTI), Dorado (ClearControl), Dragonfly (OpenCell OME-TIFF), Mantis (NDTiff)
    • WIP: DaXi

Write

  • OME-Zarr
  • Multi-page TIFF stacks organized in a directory hierarchy that mimics OME-NGFF (WIP)

Quick start

Installation

Install a released version of iohub from PyPI with pip:

sh pip install iohub

Or install the latest Git version:

sh git clone https://github.com/czbiohub-sf/iohub.git pip install /path/to/iohub

For more details about installation, see the related section in the contribution guide.

Command-line interface

To check if iohub works for a dataset:

sh 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.

Working with OME-Zarr

Load and modify an example OME-Zarr dataset:

```py import numpy as np from iohub import openomezarr

with openomezarr( "20200812-CardiomyocyteDifferentiation14-Cycle1.zarr", mode="r", layout="auto", ) as dataset: dataset.printtree() # prints the hierarchy of the zarr store channelnames = dataset.channelnames print(channelnames) imgarray = dataset[ "B/03/0/0" ] # lazy Zarr array for the raw image in the first position rawdata = imgarray.numpy() # loads a CZYX 4D array into RAM print(rawdata.mean()) # does some analysis

with openomezarr( "maxintensityprojection.zarr", mode="w-", layout="hcs", channelnames=channelnames, ) as dataset: newfov = dataset.createposition( "B", "03", "0" ) # creates fov with the same path newfov["0"] = rawdata.max(axis=1).reshape( (1, 1, 1, *rawdata.shape[2:]) ) # max projection along Z axis and prepend dims to 5D dataset.printtree() # checks that new data has been written ```

For more about API usage, refer to the documentation and the example scripts.

Reading Micro-Manager TIFF data

Read a directory containing a TIFF dataset:

```py from iohub import read_images

reader = read_images("/path/to/data/") print(reader) ```

Why iohub?

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:

  • Efficient reading of data in various TIFF-based formats produced by the Micro-Manager/Pycro-Manager acquisition stack.
  • Efficient and customizable conversion of data and metadata from TIFF to OME-Zarr.
  • Pythonic and atomic access of OME-Zarr data with parallelized analysis in mind.
  • OME-Zarr metadata is automatically constructed and updated for writing, and verified against the specification when reading.
  • Adherence to the latest OME-NGFF specification (v0.4) whenever possible.

Owner

  • Name: Chan Zuckerberg Biohub San Francisco
  • Login: czbiohub-sf
  • Kind: organization
  • Location: San Francisco

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: iohub
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Ziwen
    family-names: Liu
    email: ziwen.liu@czbiohub.org
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0001-7482-1299'
  - given-names: Ivan
    family-names: Ivanov
    orcid: 'https://orcid.org/0000-0001-6389-0213'
    affiliation: Chan Zuckerberg Biohub San Francisco
  - given-names: Jordão
    family-names: Bragantini
    orcid: 'https://orcid.org/0000-0001-7652-2735'
    email: jordao.bragantini@czbiohub.org
    affiliation: Chan Zuckerberg Biohub San Francisco
  - given-names: Talon
    family-names: Chandler
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0002-3033-674X'
  - given-names: Ahmet Can
    family-names: Solak
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0002-1381-8309'
  - given-names: Eduardo
    family-names: Hirata-Miyasaki
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0002-1016-2447'
  - given-names: Cameron
    family-names: Foltz
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0001-8933-2172'
  - given-names: Li-Hao
    family-names: Yeh
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0003-2803-5996'
  - given-names: Shalin
    family-names: Mehta
    affiliation: Chan Zuckerberg Biohub San Francisco
    orcid: 'https://orcid.org/0000-0002-2542-3582'
repository-code: 'https://github.com/czbiohub-sf/iohub/'
url: 'https://czbiohub-sf.github.io/iohub/'
abstract: Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata
keywords:
  - python
  - image-metadata
  - bioimaging
  - ndimensional-arrays
license: BSD-3-Clause
commit: dc704aa5506a84fdb2b538834ac181b691e70766
version: 0.2.0
date-released: '2025-04-22'

GitHub Events

Total
  • Create event: 43
  • Release event: 7
  • Issues event: 32
  • Watch event: 10
  • Delete event: 49
  • Member event: 1
  • Issue comment event: 119
  • Push event: 162
  • Pull request review comment event: 65
  • Pull request event: 85
  • Pull request review event: 115
  • Fork event: 2
Last Year
  • Create event: 43
  • Release event: 7
  • Issues event: 32
  • Watch event: 10
  • Delete event: 49
  • Member event: 1
  • Issue comment event: 119
  • Push event: 162
  • Pull request review comment event: 65
  • Pull request event: 85
  • Pull request review event: 115
  • Fork event: 2

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 21
  • Total pull requests: 43
  • Average time to close issues: 6 months
  • Average time to close pull requests: about 2 months
  • Total issue authors: 8
  • Total pull request authors: 9
  • Average comments per issue: 0.67
  • Average comments per pull request: 1.05
  • Merged pull requests: 27
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 18
  • Pull requests: 39
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 15 days
  • Issue authors: 8
  • Pull request authors: 7
  • Average comments per issue: 0.44
  • Average comments per pull request: 0.79
  • Merged pull requests: 27
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ziw-liu (17)
  • ieivanov (8)
  • talonchandler (5)
  • srivarra (3)
  • mattersoflight (2)
  • JoOkuma (2)
  • edyoshikun (2)
  • d-v-b (2)
  • Soorya19Pradeep (1)
  • cmalinmayor (1)
  • kfweng0512 (1)
  • ahillsley (1)
  • yuriyzubov (1)
Pull Request Authors
  • ziw-liu (35)
  • ieivanov (16)
  • edyoshikun (8)
  • talonchandler (5)
  • josephschull (3)
  • srivarra (2)
  • JoOkuma (2)
  • pattonw (1)
  • ilan-theodoro (1)
  • aaronalvarezcz (1)
  • aliddell (1)
  • alishbaimran (1)
  • yuriyzubov (1)
Top Labels
Issue Labels
μManager (7) bug (5) enhancement (5) NGFF (4) maintenance (4) documentation (3) CI (3) question (3) help wanted (1) performance (1) upstream (1) meta (1) good first issue (1)
Pull Request Labels
NGFF (19) enhancement (14) μManager (13) bug (12) maintenance (9) CI (8) documentation (7) upstream (2) meta (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,904 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 15
  • Total maintainers: 3
pypi.org: iohub

N-dimensional bioimaging data I/O with OME metadata in Python

  • Versions: 15
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 1,904 Last month
Rankings
Dependent packages count: 4.8%
Downloads: 13.0%
Stargazers count: 13.2%
Average: 13.6%
Forks count: 15.4%
Dependent repos count: 21.6%
Maintainers (3)
Last synced: 4 months ago

Dependencies

.github/workflows/pr.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v1 composite
  • actions/upload-pages-artifact v1 composite
.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
setup.py pypi