Returns the number of levels in the whole slide image. Args: wsi: a whole slide image object loaded from a file.
(self, wsi)
| 218 | |
| 219 | @abstractmethod |
| 220 | def get_level_count(self, wsi) -> int: |
| 221 | """ |
| 222 | Returns the number of levels in the whole slide image. |
| 223 | |
| 224 | Args: |
| 225 | wsi: a whole slide image object loaded from a file. |
| 226 | |
| 227 | """ |
| 228 | raise NotImplementedError(f"Subclass {self.__class__.__name__} must implement this method.") |
| 229 | |
| 230 | @abstractmethod |
| 231 | def get_downsample_ratio(self, wsi, level: int) -> float: |