MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / get_size

Method get_size

monai/data/wsi_reader.py:1332–1341  ·  view source on GitHub ↗

Returns the size (height, width) of the whole slide image at a given level. Args: wsi: a whole slide image object loaded from a file. level: the level number where the size is calculated.

(self, wsi, level: int)

Source from the content-addressed store, hash-verified

1330 return len(wsi.pages)
1331
1332 def get_size(self, wsi, level: int) -> tuple[int, int]:
1333 """
1334 Returns the size (height, width) of the whole slide image at a given level.
1335
1336 Args:
1337 wsi: a whole slide image object loaded from a file.
1338 level: the level number where the size is calculated.
1339
1340 """
1341 return (wsi.pages[level].imagelength, wsi.pages[level].imagewidth)
1342
1343 def get_downsample_ratio(self, wsi, level: int) -> float:
1344 """

Callers 1

_resize_to_mpp_resMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected