File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ authors = [
2727# Required Python version and dependencies
2828requires-python = " >=3.11"
2929dependencies = [
30- " ngio== 0.2.2 " ,
30+ " ngio>= 0.2.3, <0.3.0 " ,
3131 " fractal-task-tools==0.0.12" ,
3232]
3333
Original file line number Diff line number Diff line change 1010from typing import Any , Optional
1111
1212import ngio
13+ import ngio .images
14+ import ngio .images .label
1315from ngio .ome_zarr_meta import AxesMapper
1416from pydantic import validate_call
1517
@@ -124,22 +126,21 @@ def rechunk_zarr(
124126 axes_mapper = old_label .meta .axes_mapper ,
125127 chunk_sizes = chunk_sizes ,
126128 )
127- ngio . images . label . _derive_label (
129+ new_label = new_ome_zarr_container . derive_label (
128130 name = label ,
129- store = f"{ rechunked_zarr_url } /labels/{ label } " ,
130131 ref_image = old_label ,
131132 chunks = new_chunksize ,
132133 overwrite = overwrite ,
133134 )
134135 if rebuild_pyramids :
135- new_label = new_ome_zarr_container .get_label (name = label )
136136 new_label .set_array (old_label .get_array (mode = "dask" ))
137137 new_label .consolidate ()
138138 else :
139139 label_pyramid_paths = old_label .meta .paths
140140 for path in label_pyramid_paths :
141- new_ome_zarr_container .get_label (name = label , path = path ).set_array (
142- old_label .get_array (path = path , mode = "dask" )
141+ old_label = ome_zarr_container .get_label (name = label , path = path )
142+ new_label .set_array (
143+ old_label .get_array (mode = "dask" )
143144 )
144145
145146 if overwrite_input :
You can’t perform that action at this time.
0 commit comments