Skip to content

Commit 221a587

Browse files
committed
docs: fix some missing docs in wsi and data_utils
1 parent 511012f commit 221a587

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/prismtoolbox/utils/data_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def read_json_with_geopandas(
8585
8686
Args:
8787
file_path: The path to a json file.
88+
offset: The offset to apply to the coordinates of the geometries.
8889
8990
Returns:
9091
A GeoDataFrame object from the json file.

src/prismtoolbox/wsicore/wsi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,9 +732,9 @@ def extract_patches(
732732

733733
if mode == "contours":
734734
log.info("Extracting patches with 'contours' mode.")
735-
assert self.tissue_contours is not None
736-
assert len(self.tissue_contours) > 0
737-
assert contours_mode is not None
735+
assert self.tissue_contours is not None, "Empty tissue contours vector for the slide, please run the detect_tissue method first."
736+
assert len(self.tissue_contours) > 0, "No tissue contours found for the slide."
737+
assert contours_mode is not None, "Contours mode must be provided if mode is set to 'contours'."
738738
valid_coords = []
739739
for cont in self.tissue_contours:
740740
roi_dim = cv2.boundingRect(cont) # type: ignore

0 commit comments

Comments
 (0)