diff --git a/bioxelnodes/assets/Nodes/BioxelNodes_v1.0.0.blend b/bioxelnodes/assets/Nodes/BioxelNodes_v1.0.0.blend index bd08aa5..6852c30 100644 --- a/bioxelnodes/assets/Nodes/BioxelNodes_v1.0.0.blend +++ b/bioxelnodes/assets/Nodes/BioxelNodes_v1.0.0.blend @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:13ae301e135b547c9a348e2e7a0f2fbac42947e70c58a3a8b90875a23c5b0a4f -size 8976894 +oid sha256:b541b9cbf734c398a47dd1d0ae4000f406e3728550a09aa720c5c0ad2626a7c1 +size 8979242 diff --git a/bioxelnodes/bioxel/parse.py b/bioxelnodes/bioxel/parse.py index 556b035..a8705b4 100644 --- a/bioxelnodes/bioxel/parse.py +++ b/bioxelnodes/bioxel/parse.py @@ -61,7 +61,8 @@ def get_ext(filepath: Path) -> str: elif filepath.name.endswith(".map.gz"): return ".map.gz" else: - return filepath.suffix + suffix = filepath.suffix + return "" if len(suffix) > 5 else suffix def get_filename(filepath: Path): @@ -310,6 +311,7 @@ def parse_volumetric_data(data_file: str, series_id="", progress_callback=None): def get_meta(key): try: stirng = reader.GetMetaData(0, key).removesuffix(" ") + stirng.encode('utf-8') if stirng in ["No study description", "No series description", ""]: diff --git a/bioxelnodes/operators/io.py b/bioxelnodes/operators/io.py index 9e90a73..b32ad33 100644 --- a/bioxelnodes/operators/io.py +++ b/bioxelnodes/operators/io.py @@ -391,6 +391,7 @@ def invoke(self, context, event): def get_meta(key): try: stirng = single.GetMetaData(key).removesuffix(" ") + stirng.encode('utf-8') if stirng in ["No study description", "No series description", ""]: @@ -416,13 +417,15 @@ def get_meta(key): if series_id == "": series_id = "empty" - series_items[series_id] = "{:<20} {:>1}".format(f"{study_description}>{series_description}({series_modality})", + label = "{:<20} {:>1}".format(f"{study_description}>{series_description}({series_modality})", f"({size_x}x{size_y})x{count}") + + series_items[series_id] = label - for key, value in series_items.items(): + for series_id, label in series_items.items(): series_item = self.series_ids.add() - series_item.id = key - series_item.label = value + series_item.id = series_id + series_item.label = label if len(series_items.keys()) > 1: self.skip_series_select = False