diff --git a/README.md b/README.md index 47e6183..a17d6c0 100644 --- a/README.md +++ b/README.md @@ -1,323 +1,187 @@ -# Acquire Zarr Driver +from python.tests.test_stream import store_path -[![Build](https://github.com/acquire-project/acquire-driver-zarr/actions/workflows/build.yml/badge.svg)](https://github.com/acquire-project/acquire-driver-zarr/actions/workflows/build.yml) -[![Tests](https://github.com/acquire-project/acquire-driver-zarr/actions/workflows/test_pr.yml/badge.svg)](https://github.com/acquire-project/acquire-driver-zarr/actions/workflows/test_pr.yml) -[![Chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://acquire-imaging.zulipchat.com/) - -This is an Acquire Driver that supports chunked streaming to [zarr][]. - -## Installing Dependencies - -This driver uses the following libraries: -- blosc v1.21.5 -- nlohmann-json v3.11.3 - -We prefer using [vcpkg](https://vcpkg.io/en/) for dependency management, as it integrates well with CMake. Below are instructions for installing vcpkg locally and configuring it to fetch and compile the necessary dependencies (the steps are taken from [this vcpkg guide](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-bash)). +# Acquire Zarr streaming library -- `git clone https://github.com/microsoft/vcpkg.git` -- `cd vcpkg && ./bootstrap-vcpkg.sh ` -- Add export commands to your shell's profile script (e.g., `~/.bashrc` or `~/.zshrc`) - - `export VCPKG_ROOT=/path/to/vcpkg` - - `export PATH=$VCPKG_ROOT:$PATH` - - [Click here](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.4#set-environment-variables-in-the-system-control-panel) to learn how to add environment variables on Windows. -- Select the default CMake preset before building (consider deleting your build directory first) - - `cmake --preset=default -B /path/to/build` - - (Alternatively, from the build directory, run `cmake --preset=default /path/to/source`.) - - If you're building this project on Windows, you might need to specify your compiler triplet. This ensures that all dependencies are built as static libraries. You can specify the triplet during the preset selection process. - - `cmake --preset=default -DVCPKG_TARGET_TRIPLET=x64-windows-static ...` - -## Devices +[![Build](https://github.com/acquire-project/acquire-zarr/actions/workflows/build.yml/badge.svg)](https://github.com/acquire-project/acquire-zarr/actions/workflows/build.yml) +[![Tests](https://github.com/acquire-project/acquire-zarr/actions/workflows/test.yml/badge.svg)](https://github.com/acquire-project/acquire-zarr/actions/workflows/test_pr.yml) +[![Chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://acquire-imaging.zulipchat.com/) -### Storage +This library supports chunked, compressed, multiscale streaming to [Zarr][], with [OME-NGFF metadata]. -- **Zarr** -- **ZarrBlosc1ZstdByteShuffle** -- **ZarrBlosc1Lz4ByteShuffle** -- **ZarrV3** -- **ZarrV3Blosc1ZstdByteShuffle** -- **ZarrV3Blosc1Lz4ByteShuffle** +## Building -## Using the Zarr storage device +### Installing dependencies -Zarr has additional capabilities relative to the basic storage devices, namely _chunking_, _compression_, and -_multiscale storage_. +This library has the following dependencies: +- [c-blosc](https://github.com/Blosc/c-blosc) v1.21.5 +- [nlohmann-json](https://github.com/nlohmann/json) v3.11.3 +- [minio-cpp](https://github.com/minio/minio-cpp) v0.3.0 -To compress while streaming, you can use one of the `ZarrBlosc1*` devices. -Chunking is configured using `storage_properties_set_chunking_props()` when configuring your video stream. -Multiscale storage can be enabled or disabled by calling `storage_properties_set_enable_multiscale()` when configuring -the video stream. +We use [vcpkg] to install them, as it integrates well with CMake. +To install vcpkg, clone the repository and bootstrap it: -For the [Zarr v3] version of each device, you can use the `ZarrV3*` devices. -**Note:** Zarr v3 is not [yet](https://github.com/ome/ngff/pull/206) supported -by [ome-zarr-py](https://github.com/ome/ome-zarr-py), so you -will not be able to read multiscale metadata from the resulting dataset. +```bash +git clone https://github.com/microsoft/vcpkg.git +cd vcpkg && ./bootstrap-vcpkg.sh +``` -Zarr v3 *is* supported by [zarr-python](https://github.com/zarr-developers/zarr-python), but you will need to set two -environment variables to work with it: +and then add the vcpkg directory to your path: ```bash -export ZARR_V3_EXPERIMENTAL_API=1 -export ZARR_V3_SHARDING=1 +cat >> ~/.bashrc <