diff --git a/src/napari_segmentation_correction/_widget.py b/src/napari_segmentation_correction/_widget.py index f493fbd..d0ccf9b 100644 --- a/src/napari_segmentation_correction/_widget.py +++ b/src/napari_segmentation_correction/_widget.py @@ -642,7 +642,7 @@ def _add_option_layer(self): label_stacks = [] for d in label_dirs: # n dirs indicates number of channels - label_files = [f for f in os.listdir(os.path.join(path, d)) if '.tif' in f] + label_files = sorted([f for f in os.listdir(os.path.join(path, d)) if '.tif' in f]) label_imgs = [] for f in label_files: # n label_files indicates n time points