Skip to content

Commit dc4f549

Browse files
committed
Better progress during input slide examination
1 parent 97dfc7a commit dc4f549

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

multic/segmentationschool/Codes/wsi_loader_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,15 @@ def get_slide_data(args, wsi_directory=None):
9595
print('Getting slide metadata and usable regions...')
9696

9797
usable_slides=[]
98+
iteration = 0
9899
for slide_loc in all_slides:
100+
iteration+=1
99101
slideID,slideExt=os.path.splitext(slide_loc.split(os.sep)[-1])
100102
xmlpath=slide_loc.replace(slideExt,'.xml')
101103
if os.path.isfile(xmlpath):
102104
write_minmax_to_xml(xmlpath)
103105

104-
print("Gathering slide data ... "+ slideID,end='\r')
106+
print(f"Gathering slide data {iteration}/{len(all_slides)} for {slideID}")
105107
slide =TiffSlide(slide_loc)
106108
chop_array=get_choppable_regions(slide,args,slideID,slideExt,mask_out_loc)
107109

0 commit comments

Comments
 (0)