Metadata-Version: 2.4
Name: zarrsmith
Version: 0.6.0
Summary: Microscopy I/O, OME-Zarr forging and NGFF utilities: read vendor datasets, write multiscale OME-Zarr, fuse mosaics, from Python, the command line and napari.
Author-email: Nicola Gritti <nicola.gritti@embl.es>
License-Expression: MIT
Project-URL: Homepage, https://github.com/embl-mif/zarrsmith
Project-URL: Documentation, https://embl-mif.github.io/zarrsmith/
Project-URL: Issues, https://github.com/embl-mif/zarrsmith/issues
Project-URL: Changelog, https://github.com/embl-mif/zarrsmith/releases
Keywords: microscopy,zarr,ome-zarr,ngff,napari
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: async-lru>=2.3.0
Requires-Dist: bioio>=3.3.0
Requires-Dist: bioio-czi>=2.6.0
Requires-Dist: dask>=2026.3.0
Requires-Dist: dask-image>=2025.11.0
Requires-Dist: h5py>=3.16.0
Requires-Dist: imagecodecs>=2026.10.10
Requires-Dist: matplotlib>=3.10.8
Requires-Dist: natsort
Requires-Dist: numba>=0.64.0
Requires-Dist: numcodecs>=0.16.5
Requires-Dist: numpy>=2.4.3
Requires-Dist: ome-zarr>=0.16.0
Requires-Dist: pandas>=3.0.1
Requires-Dist: readlif>=0.6.6
Requires-Dist: scikit-image>=0.26.0
Requires-Dist: scikit-learn>=1.8.0
Requires-Dist: scipy>=1.17.1
Requires-Dist: slideio>=2.10.0
Requires-Dist: tifffile>=2026.3.3
Requires-Dist: tqdm>=4.67.3
Requires-Dist: typer>=0.24.1
Requires-Dist: xlsxwriter>=3.2.9
Requires-Dist: xyzservices>=2025.11.0
Requires-Dist: zarr>=3.1.6
Requires-Dist: zict>=3.0.0
Provides-Extra: napari
Requires-Dist: magicgui>=0.10.1; extra == "napari"
Requires-Dist: napari; extra == "napari"
Requires-Dist: napari-animation; extra == "napari"
Requires-Dist: napari-clusters-plotter>=0.11; extra == "napari"
Requires-Dist: napari-metadata; extra == "napari"
Requires-Dist: napari-ome-zarr>=0.8.2; extra == "napari"
Requires-Dist: pyconify>=0.2.1; extra == "napari"
Requires-Dist: PyQt6; extra == "napari"
Requires-Dist: QtPy>=2.4.3; extra == "napari"
Provides-Extra: notebooks
Requires-Dist: notebook>=7.5.5; extra == "notebooks"
Provides-Extra: dev
Requires-Dist: pytest>=9.0.2; extra == "dev"
Requires-Dist: build>=1.4.1; extra == "dev"
Requires-Dist: wheel>=0.46.3; extra == "dev"
Provides-Extra: docs
Requires-Dist: Sphinx>=9.1.0; extra == "docs"
Requires-Dist: sphinx-autoapi>=3.8.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=3.9.11; extra == "docs"
Requires-Dist: sphinx_rtd_theme>=3.1.0; extra == "docs"
Requires-Dist: myst-parser>=5.0.0; extra == "docs"
Provides-Extra: all
Requires-Dist: zarrsmith[dev,docs,napari,notebooks]; extra == "all"
Dynamic: license-file

<h1>
  <img src="https://raw.githubusercontent.com/embl-mif/zarrsmith/main/zarrsmith/napari/resources/zarrsmith-icon.svg" alt="ZarrSmith logo" width="120" align="left">
  ZarrSmith — microscopy I/O, OME-Zarr forging, and NGFF utilities
  <br clear="left">
</h1>
<!-- The logo has an absolute URL so that it also shows on PyPI.
documentation/index.md repeats this header in Markdown (Sphinx needs a Markdown title and does not
rewrite HTML paths) and includes this README from here. -->

![Python](https://img.shields.io/badge/python-3.12-green)
[![License](https://img.shields.io/github/license/embl-mif/zarrsmith.svg)](https://github.com/embl-mif/zarrsmith/blob/main/LICENSE)
[![Tests](https://github.com/embl-mif/zarrsmith/actions/workflows/tests.yml/badge.svg)](https://github.com/embl-mif/zarrsmith/actions/workflows/tests.yml)
[![codecov](https://codecov.io/gh/embl-mif/zarrsmith/graph/badge.svg)](https://codecov.io/gh/embl-mif/zarrsmith)
[![Documentation](https://github.com/embl-mif/zarrsmith/actions/workflows/documentation.yml/badge.svg)](https://github.com/embl-mif/zarrsmith/actions/workflows/documentation.yml)
[![Docker](https://github.com/embl-mif/zarrsmith/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/embl-mif/zarrsmith/actions/workflows/docker-publish.yml)
[![GitHub release](https://img.shields.io/github/v/release/embl-mif/zarrsmith.svg)](https://github.com/embl-mif/zarrsmith/releases)
[![GitHub stars](https://img.shields.io/github/stars/embl-mif/zarrsmith.svg?style=social)](https://github.com/embl-mif/zarrsmith/stargazers)

**ZarrSmith** is a Python package for reading microscopy datasets from multiple acquisition systems, building multiscale pyramids, writing **OME-NGFF / OME-Zarr**, and working with those datasets from Python, the command line and napari.

The rendered documentation is at **[embl-mif.github.io/zarrsmith](https://embl-mif.github.io/zarrsmith/)**.

> [!NOTE]
> ZarrSmith was called **PyMIF** up to version 0.5.5. From 0.6.0, import `zarrsmith` and run the `zarrsmith` command instead of `pymif`. The Docker images of PyMIF stay available at `ghcr.io/embl-mif/pymif:<version>`; newer images are at `ghcr.io/embl-mif/zarrsmith`.

---

## What ZarrSmith does

- **Microscope managers** read Luxendo, Opera, SCAPE, Viventis, Zeiss, Evident (Olympus VSI) and OME-Zarr datasets into one lazy (Dask) API with a shared metadata schema. → [Readers and conventions](documentation/readers.md)
- **OME-Zarr writing**: full export, empty datasets and groups, image and label region updates, any subset of the `tczyx` axes. → [Python API](documentation/python-api.md)
- **Pyramids and subsetting**: multiscale generation, cropping, channel reordering, metadata updates. → [Python API](documentation/python-api.md)
- **Mosaics**: raw tiles shown at their stage position and fused into one OME-Zarr image (3D or projection). → [Mosaics](documentation/mosaic.md)
- **Chromatic shift correction**: the Z offset between channels measured on the sample itself, and a corrected copy with the same layout as the input. → [Chromatic shift correction](documentation/chromatic-shift.md)
- **Command line**: one-off and CSV-batch conversion, mosaic fusion and chromatic shift correction. → [Command line](documentation/cli.md)
- **Napari widgets**: conversion with ROI selection, mosaic fusion, exploration of segmented objects (features plot linked with the viewer). → [Napari plugin](documentation/napari-plugin.md)
- **Output tuning**: sharding, singleton axes, parallel writing, progress bars. → [Advanced writing options](documentation/advanced.md)

## Installation

```console
conda create -n zarrsmith python=3.12
conda activate zarrsmith
git clone https://github.com/embl-mif/zarrsmith.git
cd zarrsmith
pip install .            # or: pip install -e .[napari] for development with the napari widgets
```

Versioning, releases and development installs: [Installation and versioning](documentation/installation.md).

## Quick start

```python
import zarrsmith.microscope_manager as mm

source = mm.ViventisManager("path/to/Position_1")   # any microscope manager
source.build_pyramid(num_levels=3)
source.to_zarr("output.zarr")                       # NGFF v0.5 / Zarr v3

z = mm.ZarrManager("output.zarr")
z.visualize()                                       # open in napari
```

```console
zarrsmith convert -i INPUT_PATH -m MICROSCOPE -z OUTPUT_ZARR
zarrsmith fuse -i ACQUISITION_FOLDER -z OUTPUT_ZARR -rds 4 8 8   # fuse raw tiles
zarrsmith chromatic-shift -i INPUT_ZARR -z OUTPUT_ZARR -r shift.json   # align channels in Z
```

## Documentation

**Getting started**

| Page | Contents |
|---|---|
| [Installation and versioning](documentation/installation.md) | environments, extras, release labels |
| [Readers and conventions](documentation/readers.md) | supported microscopes, shared reader behaviour, logging |

**Working with data**

| Page | Contents |
|---|---|
| [Python API](documentation/python-api.md) | export, empty datasets, axis-aware metadata, labels, region writes |
| [Mosaics](documentation/mosaic.md) | raw tiles, placement check, fusion options |
| [Chromatic shift correction](documentation/chromatic-shift.md) | measuring the Z offset between channels, the corrected dataset, checking the result, `zarrsmith chromatic-shift` |
| [Advanced writing options](documentation/advanced.md) | sharding, singleton axes, parallel writing, progress bar |

**Interfaces**

| Page | Contents |
|---|---|
| [Command line](documentation/cli.md) | `zarrsmith convert`, `zarrsmith fuse`, `zarrsmith chromatic-shift` (one dataset or a CSV batch) |
| [Napari plugin](documentation/napari-plugin.md) | converter, mosaic fusion and objects explorer widgets |

**Reference**

| Page | Contents |
|---|---|
| [API reference](https://embl-mif.github.io/zarrsmith/autoapi/zarrsmith/index.html) | generated from the docstrings |
| [Contributing](documentation/contributing.md) | package layout, adding a microscope manager or a mosaic manager, `zarrsmith.utils`, documentation |

## Help

For questions or bug reports, open an
[issue](https://github.com/embl-mif/zarrsmith/issues) on GitHub, or contact the current maintainers.

> [!IMPORTANT]
> If ZarrSmith contributes to your work, please acknowledge ZarrSmith and the EMBL Mesoscopic Imaging Facility in your publications.
