From 826aad1f5e0d5ddc74da94ad585d71d6366a781f Mon Sep 17 00:00:00 2001 From: Mart van Rijthoven Date: Sun, 23 Jun 2024 13:36:53 +0200 Subject: [PATCH] Update callbacks.py --- wholeslidedata/annotation/callbacks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wholeslidedata/annotation/callbacks.py b/wholeslidedata/annotation/callbacks.py index fe0aae0..6f1725d 100644 --- a/wholeslidedata/annotation/callbacks.py +++ b/wholeslidedata/annotation/callbacks.py @@ -55,7 +55,7 @@ def __call__(self, annotations: List[Annotation]): for x in range(x1, x2, self._tile_size-self._overlap): for y in range(y1, y2, self._tile_size-self._overlap): box_poly = geometry.box(x, y, x+self._tile_size, y+self._tile_size) - if not self._full_coverage or box_poly.within(annotation): + if not self._full_coverage or box_poly.within(annotation.geometry): new_annotations.append(Annotation.create( index=index, coordinates=box_poly.exterior.coords, @@ -63,4 +63,4 @@ def __call__(self, annotations: List[Annotation]): )) index += 1 - return new_annotations \ No newline at end of file + return new_annotations