iohub
Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata
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
Scientific Fields
Repository
Pythonic and parallelizable I/O for N-dimensional imaging data with OME metadata
Basic Info
- Host: GitHub
- Owner: czbiohub-sf
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Homepage: https://czbiohub-sf.github.io/iohub/
- Size: 743 KB
Statistics
- Stars: 39
- Watchers: 5
- Forks: 10
- Open Issues: 39
- Releases: 12
Topics
Metadata Files
README.md
iohub
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
- Website: https://www.czbiohub.org/sf/
- Repositories: 1
- Profile: https://github.com/czbiohub-sf
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
Pull Request Labels
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
- Homepage: https://github.com/czbiohub-sf/iohub
- Documentation: https://czbiohub-sf.github.io/iohub
- License: BSD 3-Clause License
-
Latest release: 0.2.2
published 5 months ago
Rankings
Maintainers (3)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/configure-pages v3 composite
- actions/deploy-pages v1 composite
- actions/upload-pages-artifact v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite