Skip to main content

BioIO

Build Status Documentation PyPI version License Python 3.10–3.13

Image Reading, Metadata Conversion, and Image Writing for Microscopy Images in Pure Python


Documentation

See the full documentation on our GitHub pages site

Example Usage (see full documentation for more examples)

Install bioio alongside OME TIFF and OME ZARR plug-ins with pip (this example won't use the OME ZARR plug-in):

pip install bioio bioio-ome-tiff bioio-ome-zarr

from bioio import BioImage

# Get a BioImage object
img = BioImage("my_file.tiff")  # selects the first scene found
img.data  # returns 5D TCZYX numpy array
img.xarray_data  # returns 5D TCZYX xarray data array backed by numpy
img.dims  # returns a Dimensions object
img.dims.order  # returns string "TCZYX"
img.dims.X  # returns size of X dimension
img.shape  # returns tuple of dimension sizes in TCZYX order
img.get_image_data("CZYX", T=0)  # returns 4D CZYX numpy array

# Get the id of the current operating scene
img.current_scene

# Get a list valid scene ids
img.scenes

# Change scene using name
img.set_scene("Image:1")
# Or by scene index
img.set_scene(1)

# Use the same operations on a different scene
# ...

Plug-in Registry

Bioio handles a variety of different image types through specific plug-ins. The bioio-dev supported plug-ins can be found within this registry. Plug-ins marked with * are community contributed and are maintained by external contributors.

Plug-in Extension Repository
arraylike ArrayLike Built-In
bioio-czi .czi Repo
bioio-dv .dv, .r3d Repo
bioio-imageio .jpg, .png, Full List Repo
bioio-imzml * .imzml Repo
bioio-lif .lif Repo
bioio-nd2 .nd2 Repo
bioio-ome-tiff .ome.tiff, .tiff Repo
bioio-ome-tiled-tiff .tiles.ome.tif Repo
bioio-ome-zarr .zarr Repo
bioio-qptiff * .qptiff Repo
bioio-sldy .sldy, .dir Repo
bioio-tifffile .tif , .tiff Repo
bioio-tiff-glob .tiff (glob) Repo
bioio-bioformats Full List Repo

Each reader plugin should closely follow the specification laid out in bioio-base. As such, it is likely common that reader plugins won't distribute their own documentation and users should instead review bioio_base.reader.Reader for API documentation for the underlying Reader API. We encourage plugin authors to publish their own documentation if they change or include new features into their published image readers.

Writer Registry

BioIO supports a set of writer backends for exporting image data. The writer registry below lists maintained writer plug-ins.

Writer Extension Documentation
OmeTiffWriter .ome.tiff Repo
OMEZarrWriter .ome.zarr (OME-NGFF 0.4.0 and 0.5.0) Repo
TimeSeriesWriter .gif, .mp4, .mkv Repo
TwoDWriter .png, .bmp, .jpg, .mov, .avi, .mpg, .mpeg, .mp4, .mkv, .wmv, .ogg Repo

Writer Installation and Usage

Writers will be installed with the respective plugin. Once installed they can be imported via bioio.writers. ex. bioio.writers<Writer Name>

import numpy as np
from bioio.writers import OmeTiffWriter # with bioio-ome-tiff installed

image = np.random.rand(10, 3, 1024, 2048)
OmeTiffWriter.save(image, "file.ome.tiff", dim_order="ZCYX")

Citation

If you use BioIO in your research, please cite the core bioio package via the DOI.

DOI

@software{bioio,
  author    = {BioIO Contributors},
  title     = {{BioIO}},
  url       = {https://github.com/bioio-devs/bioio},
  doi       = {10.5281/zenodo.XXXXXXX},
  year      = {2023},
}

For other citation formats, use the Cite this repository button at the top of this page (powered by the CITATION.cff file).

Note: BioIO's various plugins each carry their own license.

Issues

Click here to view all open issues in bioio-devs organization at once

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bioio-3.5.1.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bioio-3.5.1-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

Details for the file bioio-3.5.1.tar.gz.

File metadata

  • Download URL: bioio-3.5.1.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bioio-3.5.1.tar.gz
Algorithm Hash digest
SHA256 d68a1bcf73c9c4f7c625cbdf6d5916eb24153533164c0105cba771946e793ab0
MD5 f1256436f6c63dd190ad6f98e292db6c
BLAKE2b-256 4576ce1b82288d924198f9fc7230fca2e63205d779e31367569ed95166acac14

See more details on using hashes here.

Provenance

The following attestation bundles were made for bioio-3.5.1.tar.gz:

Publisher: ci.yml on bioio-devs/bioio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bioio-3.5.1-py3-none-any.whl.

File metadata

  • Download URL: bioio-3.5.1-py3-none-any.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for bioio-3.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c03673abe53d02fc04e1e13b420db8f4a084e9bd2f54fa60d6b7f844dc7bbc5
MD5 3fcc0ffa44140c1f83349a19f6c5c623
BLAKE2b-256 c6c151138069c0da7924fdd9b737fc9bba518c6282a61e3cc9715fef0abd3e80

See more details on using hashes here.

Provenance

The following attestation bundles were made for bioio-3.5.1-py3-none-any.whl:

Publisher: ci.yml on bioio-devs/bioio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.5.1 This release

2 files

3.5.0

2 files

3.4.0

2 files

3.3.0

2 files

3.2.0

2 files

3.1.0

2 files

3.0.0

2 files

2.0.0

2 files

1.6.1

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.9.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page