Skip to content

Commit 4aac820

Browse files
committed
Add workaround for MIP for #681
1 parent 40c5778 commit 4aac820

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

fractal_tasks_core/tasks/maximum_intensity_projection.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,20 @@ def maximum_intensity_projection(
5757
logger.info(f"{init_args.origin_url=}")
5858
logger.info(f"{zarr_url=}")
5959

60-
# Read some parameters from metadata
60+
# Read image metadata
6161
ngff_image = load_NgffImageMeta(init_args.origin_url)
62+
# Currently not using the validation models due to wavelength_id issue
63+
# See #681 for discussion
64+
# new_attrs = ngff_image.dict(exclude_none=True)
65+
# Current way to get the necessary metadata for MIP
66+
group = zarr.open_group(init_args.origin_url, mode="r")
67+
new_attrs = group.attrs.asdict()
68+
69+
print(new_attrs)
6270

6371
# Create the zarr image with correct
6472
new_image_group = zarr.group(zarr_url)
65-
new_image_group.attrs.put(ngff_image.dict(exclude_none=True))
73+
new_image_group.attrs.put(new_attrs)
6674

6775
# Load 0-th level
6876
data_czyx = da.from_zarr(init_args.origin_url + "/0")

0 commit comments

Comments
 (0)