From 9faedc15a2b87d8f25e3c868b5ca43a8e9feaf26 Mon Sep 17 00:00:00 2001 From: Xiao Gui Date: Tue, 23 Jan 2024 15:31:02 +0100 Subject: [PATCH] fix: siibra version & fix regional map --- api/common/data_handlers/compounds/download.py | 2 +- api/common/data_handlers/volumes/parcellationmap.py | 2 +- requirements/siibra.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/common/data_handlers/compounds/download.py b/api/common/data_handlers/compounds/download.py index 088b9acd..4626c41d 100644 --- a/api/common/data_handlers/compounds/download.py +++ b/api/common/data_handlers/compounds/download.py @@ -128,7 +128,7 @@ def write_desc(filename, obj, **kwargs): space: _space.Space = siibra.spaces[space_id] region = siibra.get_region(parcellation_id, region_id) region_filename = f"{region.key}.nii.gz" - regional_map = region.fetch_regional_map(space, siibra.MapType.STATISTICAL) + regional_map = region.get_regional_map(space, siibra.MapType.STATISTICAL).fetch() zipfile.writestr(region_filename, gzip.compress(regional_map.to_bytes())) write_desc(f'{region_filename}.info.md', region) except Exception as e: diff --git a/api/common/data_handlers/volumes/parcellationmap.py b/api/common/data_handlers/volumes/parcellationmap.py index 80da507d..09313651 100644 --- a/api/common/data_handlers/volumes/parcellationmap.py +++ b/api/common/data_handlers/volumes/parcellationmap.py @@ -147,7 +147,7 @@ def get_parcellation_labelled_map(parcellation_id: str, space_id: str, region_id volume_data = None if region_id is not None: region = siibra.get_region(parcellation_id, region_id) - volume_data = region.fetch_regional_map(space_id, siibra.MapType.LABELLED) + volume_data = region.get_regional_map(space_id, siibra.MapType.LABELLED).fetch() else: labelled_map = siibra.get_map(parcellation_id, space_id, siibra.MapType.LABELLED) assert labelled_map is not None, f"{error_text} returns None" diff --git a/requirements/siibra.txt b/requirements/siibra.txt index 9afa3f9f..d97fb9dc 100644 --- a/requirements/siibra.txt +++ b/requirements/siibra.txt @@ -1,3 +1,3 @@ # siibra==1.0a4 -git+https://github.com/FZJ-INM1-BDA/siibra-python.git@5789433407a70f921b7e03055533f043750c08c9 +git+https://github.com/FZJ-INM1-BDA/siibra-python.git@d5fa00f plotly