A BioIO reader plugin for reading simple image formats using imageio.
Project description
bioio-imageio
A BioIO reader plugin for reading all these formats using imageio
Documentation
See the full documentation on our GitHub pages site - the generic use and installation instructions there will work for this package.
Information about the base reader this package relies on can be found in the bioio-base repository here
Installation
Stable Release: pip install bioio-imageio
Development Head: pip install git+https://github.com/bioio-devs/bioio-imageio.git
Example Usage (see full documentation for more examples)
Install bioio-imageio alongside bioio:
pip install bioio bioio-imageio
This example shows a simple use case for just accessing the pixel data of the image
by explicitly passing this Reader into the BioImage. Passing the Reader into
the BioImage instance is optional as bioio will automatically detect installed
plug-ins and auto-select the most recently installed plug-in that supports the file
passed in.
from bioio import BioImage
import bioio_imageio
img = BioImage("my_file.mp4", reader=bioio_imageio.Reader)
img.data
TwoDWriter
Import the writer:
from bioio_imageio.writers import TwoDWriter
The TwoDWriter writes 2D (YX) or 3D (YXS) image data via imageio.
Examples from Tests
import numpy as np
from bioio_imageio.writers import TwoDWriter
# RGB image, inferred YXS
image = np.zeros((100, 100, 3), dtype=np.uint8)
TwoDWriter.save(image, "output.png")
# Channels-first array (S,Y,X) with explicit dim_order
image = np.zeros((3, 100, 100), dtype=np.uint8)
TwoDWriter.save(image, "output.bmp", "SYX")
TimeseriesWriter
Import the writer:
from bioio_imageio.writers import TimeseriesWriter
The TimeseriesWriter writes 3D (T,Y,X) or 4D (T,Y,X,S) data as animated formats via imageio.
Examples from Tests
import numpy as np
from bioio_imageio.writers import TimeseriesWriter
# Grayscale GIF (T,Y,X)
image = np.zeros((30, 100, 100), dtype=np.uint8)
TimeseriesWriter.save(image, "output.gif")
# Custom dim_order (S,Y,T,X) for GIF
image = np.zeros((3, 100, 30, 100), dtype=np.uint8)
TimeseriesWriter.save(image, "output.gif", "SYTX")
# MP4 output for 30 frames of 112x112
image = np.zeros((30, 112, 112), dtype=np.uint8)
TimeseriesWriter.save(image, "output.mp4")
Issues
Click here to view all open issues in bioio-devs organization at once or check this repository's issue tab.
Development
See CONTRIBUTING.md for information related to developing the code.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bioio_imageio-1.3.0.tar.gz.
File metadata
- Download URL: bioio_imageio-1.3.0.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c0c3239fee5865a7dbae9dda40777ae6f4464cf4e252810a6e4a94cec538406
|
|
| MD5 |
e6924ef406f35470495a83b0e71892a4
|
|
| BLAKE2b-256 |
c35f4edbff64a47bb1879164f827ac5b8c7b15e626617849ae292b5ca40c8ed9
|
Provenance
The following attestation bundles were made for bioio_imageio-1.3.0.tar.gz:
Publisher:
ci.yml on bioio-devs/bioio-imageio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioio_imageio-1.3.0.tar.gz -
Subject digest:
6c0c3239fee5865a7dbae9dda40777ae6f4464cf4e252810a6e4a94cec538406 - Sigstore transparency entry: 270848435
- Sigstore integration time:
-
Permalink:
bioio-devs/bioio-imageio@5289b3ad736649e798e9868ff44ee63f50617564 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/bioio-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5289b3ad736649e798e9868ff44ee63f50617564 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bioio_imageio-1.3.0-py3-none-any.whl.
File metadata
- Download URL: bioio_imageio-1.3.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36e958dbcaa961f899a615c4c8a41dde1943b045b385e03688fc7b3aa0ff8817
|
|
| MD5 |
a90f80634243bbef4cfccf5f62ccd37e
|
|
| BLAKE2b-256 |
df777d85ed141db96de2903950a678986377b1439a1c8828f7d5877897108e6c
|
Provenance
The following attestation bundles were made for bioio_imageio-1.3.0-py3-none-any.whl:
Publisher:
ci.yml on bioio-devs/bioio-imageio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioio_imageio-1.3.0-py3-none-any.whl -
Subject digest:
36e958dbcaa961f899a615c4c8a41dde1943b045b385e03688fc7b3aa0ff8817 - Sigstore transparency entry: 270848451
- Sigstore integration time:
-
Permalink:
bioio-devs/bioio-imageio@5289b3ad736649e798e9868ff44ee63f50617564 -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/bioio-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5289b3ad736649e798e9868ff44ee63f50617564 -
Trigger Event:
push
-
Statement type: