Skip to content

Commit

Permalink
Cleanup doc files, remove unused package
Browse files Browse the repository at this point in the history
  • Loading branch information
LDeakin committed Mar 11, 2024
1 parent 81a7a63 commit cb09c5e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 30 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ rayon = "1.8.0"
rayon_iter_concurrent_limit = "0.2.0"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.107"
strum = "0.26.1"
sysinfo = "0.30.6"
tempfile = "3.10.1"
thiserror = "1.0.57"
Expand Down Expand Up @@ -98,8 +97,5 @@ strip = true
# zarrs = { path = "../zarrs" }
# zarrs = { git = "https://github.com/LDeakin/zarrs.git" }

[dev-dependencies]
tempfile = "3.10.1"

# [profile.release]
# debug = 1
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@ Various tools for creating and manipulating [Zarr v3](https://zarr.dev) data wit
## Tools
- `zarrs_reencode`: reencode an array. [Example](https://github.com/LDeakin/zarrs_tools/blob/main/docs/reencode_rechunk.md).
- Can change the chunk size, shard size, codecs, fill value, chunk key encoding separator, and attributes.

- Outputs OME-Zarr `0.5-dev`. This revision is currently recognised by [Neuroglancer](https://github.com/google/neuroglancer) for Zarr V3.
- `zarrs_binary2zarr` (feature `binary`): create an array from piped binary data. [Example](https://github.com/LDeakin/zarrs_tools/blob/main/docs/convert_binary.md).
- `zarrs_ncvar2zarr` (feature `ncvar2zarr`): convert a netCDF variable to an array. [Example](https://github.com/LDeakin/zarrs_tools/blob/main/docs/convert_netcdf.md).
- Supports multi-file datasets where a variable has been split along a single dimension.

> [!WARNING]
> The following tools are experimental and have had limited production testing:
> The following tools are highly experimental and have had limited production testing:
- `zarrs_filter` (feature `filter`): apply simple image filters (transformations) to an array. [Example](https://github.com/LDeakin/zarrs_tools/blob/main/docs/filter.md).
- Supported filters include: reencode, crop, convert, rescale, clamp, equal, downsample, gradient magnitude.
- `zarrs_ome` (feature `ome`): convert an array to [OME-Zarr](https://ngff.openmicroscopy.org/latest/index.html). [Example](https://github.com/LDeakin/zarrs_tools/blob/main/docs/ome.md).
- `zarrs_ome` (feature `ome`): convert an array to [OME-Zarr](https://ngff.openmicroscopy.org/latest/index.html). [Example](https://github.com/LDeakin/zarrs_tools/blob/main/docs/ome_zarr.md).
- Computes a Gaussian image pyramid.

## `zarrs` Benchmarking
Expand Down
29 changes: 14 additions & 15 deletions docs/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
`zarrs_filter` is a tool supporting several simple image filters (transformations).

> [!WARNING]
> `zarrs_filter` is experimental and has had minimal production testing.
> `zarrs_filter` is highly experimental and has had limited production testing.
The filters currently supported are:
- **reencode**: Reencode (change encoding, data type, etc.)
Expand All @@ -23,23 +23,22 @@ zarrs_filter <COMMAND> --help
```

# Examples (CLI)
`array.zarr` is a $1243\times1403\times1510$ `int16` array.
```bash
cargo install --features=filter --path .
export ENCODE_ARGS="--shard-shape 256,256,256 --chunk-shape 32,32,32"
zarrs_filter reencode data/array.zarr data/filter/array_reencode.zarr ${ENCODE_ARGS}
zarrs_filter reencode data/array.zarr data/filter/array_reencode_int32.zarr ${ENCODE_ARGS} --data-type int32
zarrs_filter reencode data/array.zarr data/filter/array_reencode_float32.zarr ${ENCODE_ARGS} --data-type float32
zarrs_filter crop data/array.zarr data/filter/array_crop.zarr ${ENCODE_ARGS} --data-type float32 256,256,256 768,768,768
zarrs_filter rescale data/array.zarr data/filter/array_rescale.zarr ${ENCODE_ARGS} --data-type float32 2.0 1.0 --fill-value 1.0
zarrs_filter clamp data/array.zarr data/filter/array_clamp.zarr ${ENCODE_ARGS} --data-type float32 5 255 --fill-value 5.0
zarrs_filter equal data/array.zarr data/filter/array_equal_bool.zarr ${ENCODE_ARGS} --data-type bool 1 --fill-value true
zarrs_filter equal data/array.zarr data/filter/array_equal_uint8.zarr ${ENCODE_ARGS} --data-type uint8 1 --fill-value 1
zarrs_filter downsample data/array.zarr data/filter/array_downsample.zarr ${ENCODE_ARGS} --data-type float32 2,2,2
zarrs_filter downsample data/filter/array_equal_uint8.zarr data/filter/array_downsample_discrete.zarr ${ENCODE_ARGS} --data-type uint8 2,2,2 --discrete
zarrs_filter gradient-magnitude data/array.zarr data/filter/array_gradient_magnitude.zarr ${ENCODE_ARGS} --data-type float32
zarrs_filter gaussian data/array.zarr data/filter/array_gaussian.zarr ${ENCODE_ARGS} --data-type float32 1.0,1.0,1.0 3,3,3
zarrs_filter summed-area-table data/array.zarr data/filter/array_sat.zarr ${ENCODE_ARGS} --data-type int64
zarrs_filter reencode array.zarr array_reencode.zarr ${ENCODE_ARGS}
zarrs_filter reencode array.zarr array_reencode_int32.zarr ${ENCODE_ARGS} --data-type int32
zarrs_filter reencode array.zarr array_reencode_float32.zarr ${ENCODE_ARGS} --data-type float32
zarrs_filter crop array.zarr array_crop.zarr ${ENCODE_ARGS} --data-type float32 256,256,256 768,768,768
zarrs_filter rescale array.zarr array_rescale.zarr ${ENCODE_ARGS} --data-type float32 2.0 1.0 --fill-value 1.0
zarrs_filter clamp array.zarr array_clamp.zarr ${ENCODE_ARGS} --data-type float32 5 255 --fill-value 5.0
zarrs_filter equal array.zarr array_equal_bool.zarr ${ENCODE_ARGS} --data-type bool 1 --fill-value true
zarrs_filter equal array.zarr array_eq_u8.zarr ${ENCODE_ARGS} --data-type uint8 1 --fill-value 1
zarrs_filter downsample array.zarr array_downsample.zarr ${ENCODE_ARGS} --data-type float32 2,2,2
zarrs_filter downsample array_eq_u8.zarr array_downsample_discrete.zarr ${ENCODE_ARGS} --data-type uint8 2,2,2 --discrete
zarrs_filter gradient-magnitude array.zarr array_gradient_magnitude.zarr ${ENCODE_ARGS} --data-type float32
zarrs_filter gaussian array.zarr array_gaussian.zarr ${ENCODE_ARGS} --data-type float32 1.0,1.0,1.0 3,3,3
zarrs_filter summed-area-table array.zarr array_sat.zarr ${ENCODE_ARGS} --data-type int64
```

# Examples (Config)
Expand Down
2 changes: 1 addition & 1 deletion docs/ome.md → docs/ome_zarr.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Convert a Zarr V3 array to [OME-Zarr](https://ngff.openmicroscopy.org/latest/index.html) (0.5-dev).

> [!WARNING]
> `zarrs_ome` is experimental and has had minimal production testing.
> `zarrs_ome` is highly experimental and has had limited production testing.
`zarrs_ome` creates a multi-resolution Zarr V3 array through various methods:
- Gaussian image pyramid
Expand Down

0 comments on commit cb09c5e

Please sign in to comment.