From a7f4d03f681e9193ca0b96d8d33e657a3042ee68 Mon Sep 17 00:00:00 2001 From: Jingjing Wu <49615883+jingjingwu1225@users.noreply.github.com> Date: Wed, 20 Nov 2024 11:18:07 -0500 Subject: [PATCH] Update multi_slice.py --- linc_convert/modalities/df/multi_slice.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linc_convert/modalities/df/multi_slice.py b/linc_convert/modalities/df/multi_slice.py index c9dcaa2..e9380f3 100644 --- a/linc_convert/modalities/df/multi_slice.py +++ b/linc_convert/modalities/df/multi_slice.py @@ -229,8 +229,8 @@ def convert( multiscales[0]["axes"].insert(0, {"name": "c", "type": "channel"}) for n in range(nblevel): - shape0 = omz["0"].shape[2:] - shape = omz[str(n)].shape[2:] + shape0 = omz["0"].shape[-2:] + shape = omz[str(n)].shape[-2:] multiscales[0]["datasets"].append({}) level = multiscales[0]["datasets"][-1] level["path"] = str(n) @@ -246,7 +246,7 @@ def convert( + [ 1.0, (shape0[0] / shape[0]) * vxh, - (shape0[0] / shape[0]) * vxw, + (shape0[1] / shape[1]) * vxw, ], }, { @@ -255,7 +255,7 @@ def convert( + [ 0.0, (shape0[0] / shape[0] - 1) * vxh * 0.5, - (shape0[0] / shape[0] - 1) * vxw * 0.5, + (shape0[1] / shape[1] - 1) * vxw * 0.5, ], }, ]