Skip to content

Commit

Permalink
Update multi_slice.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingwu1225 authored Nov 20, 2024
1 parent 3b7b4de commit a7f4d03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions linc_convert/modalities/df/multi_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -246,7 +246,7 @@ def convert(
+ [
1.0,
(shape0[0] / shape[0]) * vxh,
(shape0[0] / shape[0]) * vxw,
(shape0[1] / shape[1]) * vxw,
],
},
{
Expand All @@ -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,
],
},
]
Expand Down

0 comments on commit a7f4d03

Please sign in to comment.