OME-Zarr
Kiln supports two input formats:
| Format | Preprocessing | Use Case |
|---|---|---|
| OME-Zarr (NGFF v0.4/v0.5) | None — no Kiln-specific conversion | Standard scientific imaging format, chunked arrays |
| Kiln sharded binary | Requires conversion script | Gzip-compressed bricks, HTTP Range streaming |
Kiln can load compatible multiscale OME-Zarr volumes directly over HTTP, with no Kiln-specific conversion. Point it at a .ome.zarr URL and it streams chunk data on demand.
Requirements
- OME-NGFF v0.4 and v0.5 with
multiscalesmetadata in group attributes - Single-channel or multichannel — up to 4 channels (see Multichannel)
- 3D arrays with dimensions ordered
[z, y, x](standard C-order); multichannel datasets use acaxis - Supported dtypes:
uint8,uint16,float32input (signed integers andfloat64not supported) - Multiple resolution levels (datasets within
multiscales) are used as LODs - Voxel spacing is read from
coordinateTransformationsif present - OMERO metadata is used for per-channel window auto-leveling when available
Note: Currently unsupported: more than 4 channels, signed integer types (
int8,int16), andfloat64.uint16andfloat32volumes are stored internally asr16float(WebGPU filterable-float32 is not universally available, and there's no native 16-bit-integer alternative in use here); this is not bit-exact across the fulluint16range. min/max range is read from metadata and used to normalise values in the shader.
Usage
Pass the .ome.zarr URL directly to KilnViewer.create():
import { KilnViewer } from 'kiln-render';
const viewer = await KilnViewer.create(canvas, 'https://example.com/data/scan.ome.zarr');Kiln auto-detects the format from the URL. Brick assembly (fetching Zarr chunks, decompressing, and re-chunking into 66³ bricks with ghost borders) runs in a Web Worker pool off the main thread.
Public OME-Zarr datasets
The OME-Zarr Open SciVis Datasets on AWS provide ready-to-use test volumes:
const viewer = await KilnViewer.create(
canvas,
'https://ome-zarr-scivis.s3.us-east-1.amazonaws.com/v0.5/96x2/beechnut.ome.zarr',
);Axis convention
Zarr stores dimensions as [z, y, x] (C-order, x fastest-varying). Kiln uses [x, y, z] in its metadata. Only metadata tuples are swapped; no data transposition is needed since the memory layout is identical.