google / neuroglancer

WebGL-based viewer for volumetric data
Apache License 2.0
1.05k stars 291 forks source link

Feature request: support for channels spanning chunks #284

Open perlman opened 3 years ago

perlman commented 3 years ago

Hey Jeremy, in #238 you mentioned:

However, Neuroglancer currently only supports that if the dimension is unchunked, i.e. the chunk size is equal to the full extent of the dimension; for your example dataset, the extent of the "c" dimension is 4 but the chunk size is 1, so it can't be displayed.

Potentially this limitation could be removed, though.

Support for channels spanning chunks would be useful for supporting ngff/ome-zarr. While the specification does not require channels be split, most of the current tooling does (bioformats2raw, ome-zarr).

jbms commented 3 years ago

I thought a bit about this feature, here are some thoughts:

will-moore commented 3 years ago

Thanks for looking into this.

The OME-Zarr spec can specify which channels are currently active (visible). See https://ngff.openmicroscopy.org/latest/#omero-md Although this metadata is not guaranteed to be present, it should allow in many cases to know which channels to load initially.

pattonw commented 2 years ago

:+1: for: "Perhaps it would be sufficient initially to always download all channels, though I suspect very quickly someone would attempt to use this with an array with a large number of channels." Would be more convenient for me than just re-chunking my zarrs/n5s and nothing is stopping someone from trying to load an excessive number of channels right now, they just need to make sure its not chunked.

fcollman commented 4 months ago

I just want to suggest that downloading all channel based chunks might be a good v1, and is not incompatible with making a smarter dynamic solution later if it ends up being more complicated.

I agree right now that someone could also break things with a 1000 channel image right now if it were chunked into 1 channel chunk.