Skip to content

Commit

Permalink
DOC: Update README with build instructions
Browse files Browse the repository at this point in the history
Update README with build prerequisites and instructions
  • Loading branch information
tbirdso committed Aug 31, 2023
1 parent fe5bc3c commit fce7444
Showing 1 changed file with 52 additions and 6 deletions.
58 changes: 52 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,29 @@

## Overview

This is ITK remote module for IO of images stored in zarr-backed [OME-NGFF](https://ngff.openmicroscopy.org/0.4/) file format.
This is an [ITK](https://itk.org/) external module for IO of images stored in [Zarr](https://zarr.dev/)-backed
[OME-NGFF](https://ngff.openmicroscopy.org/0.4/) file format.

## Installation

The `itk-ioomezarrngff` Python package is available on the Python Package Index.

## Build/install
C++ uses `CMake` as the build system. Python packages can be installed from PyPI:
```sh
pip install itk-ioomezarrngff
> python -m pip install itk-ioomezarrngff
```

## Usage
## Example Usage

### C++

Usage from C++ should not require any special action. In special situations, you might need to invoke:

```C++
itk::OMEZarrNGFFImageIOFactory::RegisterOneFactory();
```

### Python

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:
```python
import sys
Expand All @@ -31,7 +40,44 @@ image = itk.imread(sys.argv[1], imageio=imageio)
itk.imwrite(image, sys.argv[2], imageio=imageio, compression=False)
```

Acknowledgements
## Build Instructions

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.

### Prerequisites

- [CMake](https://cmake.org/)
- [Perl](https://www.perl.org/)
- [NASM](https://www.nasm.us/)
- An existing C++ build of [ITK](https://itk.org/)

### Building

ITKIOOMEZarrNGFF uses CMake for its build process.

```sh
# 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"
```

### Additional Notes

ITKIOOMEZarrNGFF depends on a fork of Google's [Tensorstore](https://github.com/google/tensorstore)
library for Zarr interoperation. The [InsightSoftwareConsortium/Tensorstore](https://github.com/InsightSoftwareConsortium/tensorstore)
fork implements additional functionality to maintain in-memory OME-Zarr stores.

## Acknowledgements
----------------

ITKIOOMEZarrNGFF was developed in part by with support from:
Expand Down

0 comments on commit fce7444

Please sign in to comment.