File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments