Skip to content

Commit 832c14e

Browse files
Added get_wsi_at_mpp tests; fixed a few bugs
1 parent a361fa2 commit 832c14e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

monai/data/wsi_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1316,7 +1316,7 @@ def get_mpp(self, wsi, level: int) -> tuple[float, float]:
13161316
# Here, x and y resolutions are rational numbers so each of them is represented by a tuple.
13171317
yres = wsi.pages[level].tags["YResolution"].value
13181318
xres = wsi.pages[level].tags["XResolution"].value
1319-
if xres[0] & yres[0]:
1319+
if xres[0] and yres[0]:
13201320
return convert_to_micron(yres[1] / yres[0]), convert_to_micron(xres[1] / xres[0])
13211321
else:
13221322
raise ValueError("The `XResolution` and/or `YResolution` property of the image is zero, "

0 commit comments

Comments
 (0)