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)
| 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 | """ |