Skip to content

Commit

Permalink
Streamlining
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasteuwen committed Aug 21, 2024
1 parent 5f6efe9 commit 81cf038
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dlup/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def __setstate__(self, state: dict[str, list[dict[str, Any]]]) -> None:
for point in points:
self.add_point(point)

def __copy__(self):
def __copy__(self) -> "GeometryCollection":
collection = GeometryCollection()
for polygon in self.polygons:
collection.add_polygon(polygon.__copy__())
Expand Down
2 changes: 2 additions & 0 deletions examples/annotations_to_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"""This code provides an example of how to convert annotations to a mask."""
import json
from pathlib import Path

import PIL.Image

from dlup.annotations_experimental import SlideAnnotations

fn = Path("/Users/j.teuwen/Downloads/TCGA-E9-A1R4-01Z-00-DX1.B04D5A22-8CE5-49FD-8510-14444F46894D.geojson")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_slide_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<Point x="3.5" y="0.5"/>
<Point x="3.5" y="3.5"/>
<Point x="0.5" y="3.5"/>
<Point x="0.5" y="0.5"/>
<Point x="0.5" y="0.5"/>
</Interior>
</Interiors>
</Polygon>
Expand Down

0 comments on commit 81cf038

Please sign in to comment.