OME-TIFF and OME-ZARR writer APIs designed for microscopy acquisition
Project description
ome-writers
OME-TIFF and OME-ZARR writer APIs designed for microscopy acquisition.
This package provides a unified interface for writing OME-TIFF and OME-ZARR files,
with various different backends. It is currently designed/optimized for
"deterministic" use cases where the shape of the data is known ahead of time, and
the data can be efficiently chunked and written in a predictable manner with a
series of calls to stream.append(frame) as the data is generated.
Installation
pip install ome-writers
Or, include all optional dependencies for specific backends:
tensorstore: fortensorstorebackend supportacquire-zarr: foracquire-zarrbackend supporttiff: fortiffbackend support usingtifffile.all: install all backends
pip install "ome-writers[all]"
Basic Usage
from ome_writers import Dimension, create_stream
# Configure the dimensions of the data stream
# The stream expects that data will be appended in the order and shape
# defined by the dimensions.
# labels must currently be one of 't', 'c', 'z', 'y', 'x', or 'p' (stage position).
dims = [
Dimension(label="t", size=10, unit=(1.0, "s")),
Dimension(label="c", size=3),
Dimension(label="z", size=5, unit=(1.0, "um")),
Dimension(label="y", size=512, unit=(1.0, "um"), chunk_size=128),
Dimension(label="x", size=512, unit=(1.0, "um"), chunk_size=128),
]
stream = create_stream(
"my_data.zarr",
dimensions=dims,
dtype='uint16',
# backend may be any of
# "acquire-zarr", "tensorstore", "tiff" (for ome-tiff) or "auto"
backend="acquire-zarr"
)
# Write data frame by frame, as it is generated by your application
for frame in ...:
stream.append(frame)
# Flush any pending writes to disk
stream.flush()
Contributing
This is a work in progress; we absolutely welcome and appreciate contributions! If you have suggestions, improvements, or bug fixes, please open an issue or submit a pull request.
git clone https://github.com/pymmcore-plus/ome-writers.git
cd ome-writers
# setup env
uv sync
# test
uv run pytest
# lint
uv run pre-commit run -a
Project details
Release history Release notifications | RSS feed
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 ome_writers-0.0.1b1.tar.gz.
File metadata
- Download URL: ome_writers-0.0.1b1.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e037ebcf992a76d8eb7108618416426606f93047992d34aa0d3950f4b3241f4b
|
|
| MD5 |
34b4a58e4d44d52bfcf91d582b887d4f
|
|
| BLAKE2b-256 |
bcec630f772c77e34b1fcee2a1dd819eb1a1550b25ef0624c04cc88e0a8b4861
|
Provenance
The following attestation bundles were made for ome_writers-0.0.1b1.tar.gz:
Publisher:
ci.yml on pymmcore-plus/ome-writers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ome_writers-0.0.1b1.tar.gz -
Subject digest:
e037ebcf992a76d8eb7108618416426606f93047992d34aa0d3950f4b3241f4b - Sigstore transparency entry: 497141398
- Sigstore integration time:
-
Permalink:
pymmcore-plus/ome-writers@5eaabe27f907bd35b5f6fa048e8ae8d81b2be35f -
Branch / Tag:
refs/tags/v0.0.1.b1 - Owner: https://github.com/pymmcore-plus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5eaabe27f907bd35b5f6fa048e8ae8d81b2be35f -
Trigger Event:
push
-
Statement type:
File details
Details for the file ome_writers-0.0.1b1-py3-none-any.whl.
File metadata
- Download URL: ome_writers-0.0.1b1-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
185b8d6cfd8a6ecb21666092d158f2f7708a91322b2d3ea19283b653e2c4a8c5
|
|
| MD5 |
b5e092fab5639de80afa23a7d8a289c6
|
|
| BLAKE2b-256 |
c7ac1f7315f58c3350525790a2bd91e500dac0428d94093035145cd014225494
|
Provenance
The following attestation bundles were made for ome_writers-0.0.1b1-py3-none-any.whl:
Publisher:
ci.yml on pymmcore-plus/ome-writers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ome_writers-0.0.1b1-py3-none-any.whl -
Subject digest:
185b8d6cfd8a6ecb21666092d158f2f7708a91322b2d3ea19283b653e2c4a8c5 - Sigstore transparency entry: 497141422
- Sigstore integration time:
-
Permalink:
pymmcore-plus/ome-writers@5eaabe27f907bd35b5f6fa048e8ae8d81b2be35f -
Branch / Tag:
refs/tags/v0.0.1.b1 - Owner: https://github.com/pymmcore-plus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@5eaabe27f907bd35b5f6fa048e8ae8d81b2be35f -
Trigger Event:
push
-
Statement type: