A BioIO reader plugin for reading tiff files in the OME format.
Project description
bioio-ome-tiff
A BioIO reader plugin for reading OME TIFF files using tifffile
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-ome-tiff
Development Head: pip install git+https://github.com/bioio-devs/bioio-ome-tiff.git
Example Usage (see full documentation for more examples)
Install bioio-ome-tiff alongside bioio:
pip install bioio bioio-ome-tiff
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_ome_tiff
img = BioImage("my_file.ome.tiff", reader=bioio_ome_tiff.Reader)
img.data
OmeTiffWriter
Import for the writer:
from bioio_ome_tiff.writers import OmeTiffWriter
The OmeTiffWriter lets you save image data to OME-TIFF files, supporting:
- Single- or multi-scene datasets with explicit dimension order
- Custom channel names, colors, and physical pixel sizes
- Automatic generation and validation of OME-XML metadata
- BigTIFF output for large (>2 GB) images
Example Usage
# Write a TCZYX dataset to OME-TIFF
image = numpy.ndarray([1, 10, 3, 1024, 2048])
OmeTiffWriter.save(image, "file.ome.tif")
# Write data with a specific dimension order
image = numpy.ndarray([10, 3, 1024, 2048])
OmeTiffWriter.save(image, "file.ome.tif", dim_order="ZCYX")
# Write multi-scene data, specifying channel names
image0 = numpy.ndarray([3, 10, 1024, 2048])
image1 = numpy.ndarray([3, 10, 512, 512])
OmeTiffWriter.save(
[image0, image1],
"file.ome.tif",
dim_order="CZYX", # will be applied to both scenes
channel_names=[["C00", "C01", "C02"], ["C10", "C11", "C12"]],
)
# Write data with a custom compression scheme
image = numpy.ndarray([1, 10, 3, 1024, 2048])
OmeTiffWriter.save(
image,
"file.ome.tif",
tifffile_kwargs={
"compression": "zlib",
"compressionargs": {"level": 8},
},
)
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_ome_tiff-1.4.0.tar.gz.
File metadata
- Download URL: bioio_ome_tiff-1.4.0.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0073ff612926ea17c72a32f378d62361e282dd7afbc561e8c0a53316fd8d2e29
|
|
| MD5 |
3c05453ff413b0a6664051064dfad0b0
|
|
| BLAKE2b-256 |
b395fd5ccfb07c5159983a40746b1c0da1c7648918bcfdb940189bf52f7340d1
|
Provenance
The following attestation bundles were made for bioio_ome_tiff-1.4.0.tar.gz:
Publisher:
ci.yml on bioio-devs/bioio-ome-tiff
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioio_ome_tiff-1.4.0.tar.gz -
Subject digest:
0073ff612926ea17c72a32f378d62361e282dd7afbc561e8c0a53316fd8d2e29 - Sigstore transparency entry: 270882004
- Sigstore integration time:
-
Permalink:
bioio-devs/bioio-ome-tiff@58e644b47652e0f122f7070a6261d0cf17cd437f -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/bioio-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@58e644b47652e0f122f7070a6261d0cf17cd437f -
Trigger Event:
push
-
Statement type:
File details
Details for the file bioio_ome_tiff-1.4.0-py3-none-any.whl.
File metadata
- Download URL: bioio_ome_tiff-1.4.0-py3-none-any.whl
- Upload date:
- Size: 27.0 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 |
98107a847244a7b515c7a8c39b5119e67f4047b63661238b49b3d0cc36a86cd9
|
|
| MD5 |
bc87884d1cf3cf34103ac6383d4f47e0
|
|
| BLAKE2b-256 |
ec88cdfc59ac1fb3db84d59d47b8afa3bcf539b8afabc86d8b5230909b6487f9
|
Provenance
The following attestation bundles were made for bioio_ome_tiff-1.4.0-py3-none-any.whl:
Publisher:
ci.yml on bioio-devs/bioio-ome-tiff
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bioio_ome_tiff-1.4.0-py3-none-any.whl -
Subject digest:
98107a847244a7b515c7a8c39b5119e67f4047b63661238b49b3d0cc36a86cd9 - Sigstore transparency entry: 270882012
- Sigstore integration time:
-
Permalink:
bioio-devs/bioio-ome-tiff@58e644b47652e0f122f7070a6261d0cf17cd437f -
Branch / Tag:
refs/tags/v1.4.0 - Owner: https://github.com/bioio-devs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@58e644b47652e0f122f7070a6261d0cf17cd437f -
Trigger Event:
push
-
Statement type: