From 9816cfc58cf0609b9f6e6bf270eaf25a1106ddf8 Mon Sep 17 00:00:00 2001 From: Mr-Milk Date: Mon, 11 Dec 2023 17:21:59 +0100 Subject: [PATCH] Ensure get patch is in integer --- lazyslide/wsi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lazyslide/wsi.py b/lazyslide/wsi.py index 2e616a5..e637b20 100644 --- a/lazyslide/wsi.py +++ b/lazyslide/wsi.py @@ -674,7 +674,9 @@ def plot_mask( # return WSIDataset(self, transform=transform, run_pretrained=run_pretrained, **kwargs) def get_patch(self, left, top, width, height, level=0, **kwargs): - return self.reader.get_patch(left, top, width, height, level=level, **kwargs) + return self.reader.get_patch( + int(left), int(top), int(width), int(height), level=level, **kwargs + ) def shuffle_tiles(self, seed=0): rng = np.random.default_rng(seed)