Metadata-Version: 2.4
Name: nd-image-codecs
Version: 0.2.3
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Dist: numpy>=1.26
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: imagecodecs ; extra == 'test'
Requires-Dist: jsonschema>=4.0.0 ; extra == 'test'
Requires-Dist: zarr>=3.1 ; extra == 'test'
Requires-Dist: ngff-zarr[validate] ; extra == 'test'
Requires-Dist: ome-zarr>=0.12.0 ; extra == 'test'
Requires-Dist: zarr>=3.1 ; extra == 'zarr'
Provides-Extra: test
Provides-Extra: zarr
Summary: Composable Zarr v3 codecs (nd-delta, nd-lift-ht, nd-zfp) for ND scientific images — cross-axis lifting, HTJ2K coefficient planes, and ZFP, with an axis-aware codec-series builder.
Keywords: htj2k,jpeg2000,zfp,zarr,numcodecs,microscopy,compression,ome-ngff
Author: Fideus Labs LLC
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/fideus-labs/nd-image-codecs/tree/main/docs
Project-URL: Repository, https://github.com/fideus-labs/nd-image-codecs

# nd-image-codecs

**Composable Zarr v3 codecs for ND scientific images** — Python binding.

A family of Zarr v3 codecs that capture correlation along z, time, and channel
axes *explicitly* — as ordinary, independently specified array-to-array and
array-to-bytes codecs — then store the result with a fast entropy backend,
High-Throughput JPEG 2000 (ISO/IEC 15444-15) coefficient planes, or ZFP blocks.
Built for OME-Zarr / OME-NGFF.

> No JPEG 2000 Part 2 (MCT) syntax anywhere — cross-axis decorrelation is an
> explicit Zarr codec, sidestepping Part 2 IP entirely.

## The three codec families

`codec_series` assembles a *series* (pipeline) of Zarr v3 codecs from an array's
axis metadata:

| Family | Series (pipeline) | Built for |
| --- | --- | --- |
| **nd-delta** | `transpose → numcodecs.delta → bitshuffle → zstd/lz4` | Fast lossless storage from **existing** Zarr codecs only |
| **nd-lift-ht** | `transpose → nd_lift → htj2k` | Scalable microscopy & volume visualization |
| **nd-zfp** | `transpose → reshape → zfp` | GPU volume rendering, random access, fixed-rate memory |

## Install

```sh
pip install nd-image-codecs           # NumPy only
pip install "nd-image-codecs[zarr]"   # + zarr-python v3, for the codec pipeline
```

Wheels cover manylinux, musllinux, macOS, and Windows on x86-64 and arm64.
The base install requires only NumPy, so `codec_series` and the `htj2k`,
`zfp`, and `nd_lift` codecs are usable anywhere that wheel lands; the `zarr`
extra adds `zarr-python` (and, through it, `numcodecs`) to run pipelines.

## Usage

```python
from nd_image_codecs import codec_series

codecs = codec_series(["t", "c", "z", "y", "x"], [8, 1, 32, 256, 256],
                      "uint16", "nd-lift-ht")
```

The three codec classes (`NdLift`, `Htj2k`, `NdZfp`) register with `zarr-python`
v3 through the `zarr.codecs` entry-point group, so pipelines produced by
`codec_series` resolve by name.

## Status

**Alpha.** `nd_lift`, `htj2k`, and `zfp` encode and decode for real, and the
`codec_series` builder is cross-checked byte-identical against the Rust and
TypeScript implementations in CI. The API is not stable before 1.0.

## Links

- [Repository](https://github.com/fideus-labs/nd-image-codecs)
- [Python usage guide](https://github.com/fideus-labs/nd-image-codecs/blob/main/docs/usage/python.md)
- [Architecture](https://github.com/fideus-labs/nd-image-codecs/blob/main/docs/architecture/index.md)

## License

MIT — Copyright (c) Fideus Labs LLC.

