Metadata-Version: 2.4
Name: zarrmony
Version: 0.2.1
Summary: Convert any bioimage file to OME-Zarr v0.5, preserving metadata.
Project-URL: Homepage, https://github.com/ferrinm/zarrmony
Project-URL: Issues, https://github.com/ferrinm/zarrmony/issues
Project-URL: Changelog, https://github.com/ferrinm/zarrmony/blob/main/CHANGELOG.md
Author-email: Max Ferrin <ferrin@calicolabs.com>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.13
Requires-Dist: bioio-czi>=2.6.1
Requires-Dist: bioio-lif>=1.4.2
Requires-Dist: bioio-nd2>=1.7.0
Requires-Dist: bioio-ome-zarr>=3.3.0
Requires-Dist: bioio>=3.3.0
Requires-Dist: click>=8.3.0
Requires-Dist: dask>=2026.3.0
Requires-Dist: numpy>=2
Requires-Dist: ome-types>=0.6.3
Requires-Dist: pydantic>=2.10
Requires-Dist: scikit-image>=0.26.0
Requires-Dist: xarray>=2025.9.0
Requires-Dist: zarr<3.2,>=3.1
Provides-Extra: all
Requires-Dist: bioio-ome-tiff; extra == 'all'
Requires-Dist: gcsfs; extra == 'all'
Requires-Dist: s3fs; extra == 'all'
Provides-Extra: dev
Requires-Dist: bioio-ome-tiff; extra == 'dev'
Requires-Dist: pre-commit>=4; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.14; extra == 'dev'
Provides-Extra: gcs
Requires-Dist: gcsfs; extra == 'gcs'
Provides-Extra: notebook
Requires-Dist: ipykernel>=6; extra == 'notebook'
Requires-Dist: jupyter>=1.1.1; extra == 'notebook'
Requires-Dist: matplotlib>=3.9; extra == 'notebook'
Requires-Dist: tabulate>=0.9; extra == 'notebook'
Provides-Extra: ome-tiff
Requires-Dist: bioio-ome-tiff; extra == 'ome-tiff'
Provides-Extra: s3
Requires-Dist: s3fs; extra == 's3'
Description-Content-Type: text/markdown

# zarrmony

Convert any bioimage file to OME-Zarr v0.5, preserving metadata.

Zarrmony reads proprietary microscopy formats (CZI, LIF, ND2, OME-TIFF, ...) via [bioio](https://bioio-devs.github.io/bioio/) and writes them as OME-Zarr v0.5, with a configurable user-metadata gate, mean-pool pyramid generation, and a full audit trail of the conversion.

By default each scene becomes its own self-describing `<scene>.ome.zarr` store under the output directory. The legacy bundled [`bioformats2raw.layout`](https://ngff.openmicroscopy.org/0.5/#bf2raw) shape is opt-in via `--layout bf2raw` (CLI) or `layout="bf2raw"` (library).

> **Status:** v0.1 in active development. API and metadata schema are not yet stable.

## Install

```bash
pip install zarrmony
```

Optional extras:

| Extra      | Adds                     | When you need it               |
|------------|--------------------------|--------------------------------|
| `gcs`      | `gcsfs`                  | Writing output to `gs://` URIs |
| `s3`       | `s3fs`                   | Writing output to `s3://` URIs |
| `ome-tiff` | `bioio-ome-tiff`         | Reading OME-TIFF input         |
| `all`      | All of the above         |                                |
| `dev`      | pytest, ruff, pre-commit | Contributing                   |

CZI, LIF, and ND2 reader plugins are included by default.

## Usage

### CLI

```bash
# Per-scene (default): writes one <scene>.ome.zarr store per scene under OUTPUT.
zarrmony convert input.czi output_dir/ --metadata-file metadata.json

# Bundled bioformats2raw.layout (opt-in): writes a single store at OUTPUT.
zarrmony convert input.czi output.ome.zarr --layout bf2raw --metadata-file metadata.json

zarrmony inspect input.czi
zarrmony schema dump > zarrmony-metadata.schema.json
```

### Library

```python
from zarrmony import convert, UserMetadata

# Per-scene (default): returns {"input": ..., "stores": [<per-store audit>, ...]}.
result = convert(
    "input.lif",
    "output_dir/",
    metadata=UserMetadata(...),
)

# Bundled: returns the single bundle's audit dict.
audit = convert(
    "input.lif",
    "output.ome.zarr",
    layout="bf2raw",
    metadata=UserMetadata(...),
)
```

## Extending zarrmony

Add support for a new bioimage format by writing a reader plugin. See
[**Writing a zarrmony reader plugin**](./docs/writing-a-reader-plugin.md)
for the Reader Protocol, matcher conventions, entry-point registration,
and a worked example.

## License

Apache-2.0. See [LICENSE](./LICENSE).
