Crates.io | h2n5 |
lib.rs | h2n5 |
version | 0.1.9 |
source | src |
created_at | 2018-03-18 21:13:40.466009 |
updated_at | 2022-06-13 09:06:16.961415 |
description | HTTP 2 N5: Serve N5 datasets over HTTP as tiled image stacks |
homepage | |
repository | https://github.com/aschampion/h2n5 |
max_upload_size | |
id | 56325 |
size | 94,255 |
H2N5 is:
Stable 1.56
cargo install h2n5
h2n5 path/to/my.n5
curl http://127.0.0.1:8088/tile/group/dataset/0_1/512_256/1/2/3.jpg?q=80
Tile URLs are constructed as:
http://[bind_address]:[port]/tile/[n5_dataset]/[slicing_dims]/[tile_size]/[coordinates].[format]?[query parameters]
For example, the URL:
http://127.0.0.1:8088/tile/group/dataset/0_1/512_256/1/2/3.jpg?q=80
Will slice a 512 px by 256 px tile from the group/dataset
dataset along axes 0
(as tile X) and 1
(as tile Y), respectively. The returned tile will start at voxel coordinates [1, 2, 3], be encoded as JPEG, with a quality of 80.
For more options, see the command line help:
h2n5 -h
png
) and JPEG (jpg
|jpeg
) encoding formats are supported.pack
query parameter. Slicing a third dimension for RGB(A) channels (e.g., slicing_dims
as 0_1_4
) will be supported, and is currently parsed correctly, but not yet implemented for tile encoding.gray (default) | graya | rgba | |
---|---|---|---|
UINT8 | JPEG PNG | ||
UINT16 | PNG | JPEG PNG | |
UINT32 | PNG | JPEG PNG | |
UINT64 | PNG | ||
FLOAT32 | PNG | JPEG PNG | |
FLOAT64 | PNG |
Logs are output to stderr using standard Rust log
and env_logger
in the actix_web
scope. By default only major errors at the WARN
level or above are shown. For example, to show all requests:
RUST_LOG=actix_web=info h2n5
For more information, see the env_logger
and actix_web
logging middleware documentation.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.