-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
This is written based upon th state of the code in #516
In this PR, ome-zarr-py has two entrypoints to writing data, notably:
-
write_image: Calls the private method_write_dask_image, which- uses
scale._build_pyramidto generate a list of pyramidal delayed dask images - writes these to disc
- writes the metadatato disk with
write_multiscales_metadata
- uses
-
write_multiscales_image: Requires a pre-computed or delayed image pyramid and- writes the levels to disk
- writes the metadata to disk with
write_multiscales_metadata
There is some obvious duplicity between both entrypoints. I suggest to:
- Move
_build_pyramidup from_write_dask_imageinto thewrite_imagefunction. That way,write_dask_imagewould be demoted to a function to simpl write pyramidal dask data and associated metadata - That would make the contents of
_write_dask_imageandwrite_multiscalespractically identically, so_write_dask_imagecould also be used insidewrite_multiscales.
This would greatly improve maintainability and condense the code down to a single location for writing were metadata for different ome-zarr versions would be handled.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels