scalableminds / webknossos-libs

Python API and CLI tools for working with WEBKNOSSOS datasets, annotations and server interactions. Includes converter to OME-Zarr.
https://docs.webknossos.org/webknossos-py/index.html
22 stars 11 forks source link

Support 2d conversion #272

Open normanrz opened 3 years ago

normanrz commented 3 years ago

The wkw format is ill-suited for large 2D images. Therefore, webknossos has experimental support for tiled-tiff formats. The cuber should auto-detect 2D input files and convert them to tiled-tiffs including metadata.

I believe @fm3 has some example code for how to produce tiled tiffs.

fm3 commented 3 years ago

See https://github.com/scalableminds/webknossos-connect/pull/97

jstriebel commented 2 years ago

I guess we should use zarr with a z-chunk-size of 1 instead here. Is there anything preventing anisotropic chunk-sizes in the wk-backen atm @fm3? If not we could incorporate this already into add_layer_from_images, using a better chunk-size default for 2D datasets.

fm3 commented 2 years ago

The zarr adapter in the wk backend supports 2d chunk sizes. However, the backend logic is not really optimized for these. It will still do 32³ cutouts etc. Still I agree that this may be a good way to deal with 2d datasets in the long run.

jstriebel commented 2 years ago

Thanks for the info! Then we could still do 2D chunk sizes, at it would greatly reduce the storage on disk / in the cloud. Efficiency for streaming this to the browser is a different topic I think.