From 53c383e52a1abebb8b3992ddc853073145ef59c6 Mon Sep 17 00:00:00 2001 From: TimMonko <47310455+TimMonko@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:34:04 -0600 Subject: [PATCH] change layer name ordering --- src/napari_ndev/nimage.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/napari_ndev/nimage.py b/src/napari_ndev/nimage.py index 770d3c2..a718f1a 100644 --- a/src/napari_ndev/nimage.py +++ b/src/napari_ndev/nimage.py @@ -185,7 +185,7 @@ def get_napari_metadata( meta = {} scene = self.current_scene - scene_index = self.current_scene_index + scene_idx = self.current_scene_index single_no_scene = len(self.scenes) == 1 and self.current_scene == "Image:0" channel_dim = DimensionNames.Channel @@ -193,13 +193,12 @@ def get_napari_metadata( # use filename if single scene and no scene name available if single_no_scene: channels_with_scene_index = [ - f'{Path(path).stem}{LABEL_DELIMITER}{C}' + f'{C}{LABEL_DELIMITER}{Path(path).stem}' for C in self.napari_data.coords[channel_dim].data.tolist() ] else: channels_with_scene_index = [ - f'{scene_index}{LABEL_DELIMITER}' - f'{scene}{LABEL_DELIMITER}{C}' + f'{C}{LABEL_DELIMITER}{scene_idx}{LABEL_DELIMITER}{scene}' for C in self.napari_data.coords[channel_dim].data.tolist() ] meta['name'] = channels_with_scene_index