This is an ITK external module for IO of images stored in Zarr-backed OME-NGFF file format.
The itk-ioomezarrngff
Python package is available on the Python Package Index.
> python -m pip install itk-ioomezarrngff
Usage from C++ should not require any special action. In special situations, you might need to invoke:
itk::OMEZarrNGFFImageIOFactory::RegisterOneFactory();
In Python, we need to explicitly specify the IO, otherwise DICOM IO will be invoked because it is the built-in default for directories. Example:
import sys
import itk
imageio = itk.OMEZarrNGFFImageIO.New()
image = itk.imread(sys.argv[1], imageio=imageio)
itk.imwrite(image, sys.argv[2], imageio=imageio, compression=False)
ITKIOOMEZarrNGFF is an ITK C++ external module. It may be built with CMake
and build tools such as
Ninja, gcc, or MSVC.
In the future ITKIOOMEZarrNGFF may be made available as an ITK remote module for direct inclusion in the ITK build process.
ITKIOOMEZarrNGFF uses CMake for its build process.
# Create the build directory
> mkdir path/to/ITKIOOMEZarrNGFF-build
> cd path/to/ITKIOOMEZarrNGFF-build
# Configure the project
path/to/ITKIOOMEZarrNGFF-build > cmake -DITK_DIR:PATH="path/to/ITK-build" "path/to/ITKIOOMEZarrNGFF"
# Build the project
path/to/ITKIOOMEZarrNGFF-build > cmake --build . --config "Release"
ITKIOOMEZarrNGFF tests may be run with CTest:
path/to/ITKIOOMEZarrNGFF-build > ctest -C "Release"
See the ITK Software Guide for information on wrapping ITK external modules for Python.
ITKIOOMEZarrNGFF depends on a fork of Google's Tensorstore library for Zarr interoperation. The InsightSoftwareConsortium/Tensorstore fork implements additional zip support, both for filesystem and in memory zip reading and writing.
ITKIOOMEZarrNGFF was developed in part with support from:
- NIH NIMH BRAIN Initiative under award 1RF1MH126732.
- The Allen Institute for Neural Dynamics (AIND).