Command Line Interface (CLI)

ngff-zarr provides a command line interface to convert a variety of scientific file formats to ome-zarr and inspect and ome-zarr store’s contents.

Installation

To install the command line interface (CLI):

pip install 'ngff-zarr[cli]'

Usage

Convert an image file

Convert any scientific image file format supported by either itk, tifffile, or imageio.

Example:

ngff-zarr -i ./MR-head.nrrd -o ./MR-head.zarr

ngff-zarr convert

Convert an image volume slice series

Note the quotes:

ngff-zarr -i "series/*.tif" -o ome-ngff.zarr

Specify output chunks

ngff-zarr -c 64 -i ./MR-head.nrrd

ngff-zarr output chunks

Specify metadata

ngff-zarr --dims "z" "y" "x" --scale x 1.4 y 1.4 z 2.5 --translation x 6.24 y 360.0 z 332.5 --name LIDC2 -i "series/*.tif"

ngff-zarr metadata

Limit memory consumption

Limit memory consumption by passing a rough memory limit in human-readable units, e.g. 8GB with the --memory-target option.

ngff-zarr --memory-target 50M -i ./LIDCFull.vtk -o ./LIDCFull.zarr

ngff-zarr memory-target

More options

ngff-zarr --help