File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,18 @@ def segment_with_stardist(ff, out):
1717
1818
1919def main ():
20- files = glob ("predictions/sgn-new/*.tif" )
21- out_folder = "./predictions/stardist"
20+ direc = "/mnt/vast-nhr/projects/nim00007/data/moser/predictions/sgn-new"
21+ out_folder = "/mnt/vast-nhr/projects/nim00007/data/moser/cochlea-lightsheet/predictions/stardist"
22+
23+ files = [entry .path for entry in os .scandir (direc ) if ".tif" in entry .name ]
24+ files .sort ()
25+ file_names = [entry .name .split (".tif" )[0 ] for entry in os .scandir (direc ) if ".tif" in entry .name ]
26+ file_names .sort ()
27+
2228 os .makedirs (out_folder , exist_ok = True )
23- for ff in files :
24- out = imread ( ff )
25- segment_with_stardist (ff , out )
29+ for f_path , f_name in zip ( files , file_names ) :
30+ out = os . path . join ( out_folder , f" { f_name } _seg.tif" )
31+ segment_with_stardist (f_path , out )
2632
2733
2834if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments