File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
python/ouroboros/pipeline Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,10 @@ def _process(self,
7777 return (f"The straightened volume does not exist at { straightened_volume_path } ." )
7878
7979 if Path (straightened_volume_path ).is_dir ():
80- with tifffile .TiffFile (next (Path (straightened_volume_path ). iterdir ( ))) as tif :
80+ with tifffile .TiffFile (next (get_sorted_tif_files (straightened_volume_path ))) as tif :
8181 is_compressed = bool (tif .pages [0 ].compression )
8282 # tiff format check to add
83- FPShape = FrontProjStack (D = len (list ( Path ( straightened_volume_path ). iterdir () )),
83+ FPShape = FrontProjStack (D = len (get_sorted_tif_files ( straightened_volume_path )),
8484 V = tif .pages [0 ].shape [0 ], U = tif .pages [0 ].shape [1 ])
8585 channels = 1 if len (tif .pages [0 ].shape ) < 3 else tif .pages [0 ].shape [- 1 ]
8686 else :
@@ -100,7 +100,7 @@ def _process(self,
100100 cannot_memmap = False
101101 try :
102102 if Path (straightened_volume_path ).is_dir ():
103- _ = tifffile .memmap (next (Path (straightened_volume_path ). iterdir ( )), mode = "r" )
103+ _ = tifffile .memmap (next (get_sorted_tif_files (straightened_volume_path )), mode = "r" )
104104 else :
105105 _ = tifffile .memmap (straightened_volume_path , mode = "r" )
106106 except : # noqa: E722
You can’t perform that action at this time.
0 commit comments