diff --git a/siibra/configuration/factory.py b/siibra/configuration/factory.py index bb751959c..de1478856 100644 --- a/siibra/configuration/factory.py +++ b/siibra/configuration/factory.py @@ -277,7 +277,7 @@ def build_volume(cls, spec): bbox=cls.build_boundingbox(spec) ) if result._boundingbox is not None: - assert result._boundingbox.space == result.space, "BoundingBox of a volume cannot be in a different space than the volume's space." + assert result._boundingbox._space_spec == result._space_spec, "BoundingBox of a volume cannot be in a different space than the volume's space." return result @@ -358,9 +358,9 @@ def build_boundingbox(cls, spec): bboxspec = spec.get("boundingbox", None) if bboxspec is None: return None - space_id = bboxspec.get("space").get("@id") + space_spec = bboxspec.get("space") coords = [tuple(c) for c in bboxspec.get("coordinates")] - return boundingbox.BoundingBox(coords[0], coords[1], space=space_id) + return boundingbox.BoundingBox(coords[0], coords[1], space=space_spec) @classmethod @build_type("siibra/feature/fingerprint/receptor/v0.1") diff --git a/test/core/test_parcellation.py b/test/core/test_parcellation.py index 949b98b06..e24f7b9dc 100644 --- a/test/core/test_parcellation.py +++ b/test/core/test_parcellation.py @@ -238,7 +238,7 @@ def test_get_region(self, regionspec, find_topmost, allow_tuple, result): @pytest.mark.parametrize('space_id,parc_id,map_type', [ - ('waxholm', 'v4', 'labelled') + ('waxholm', 'waxholm v4', 'labelled') ]) def test_should_be_able_to_fetch_map(space_id, parc_id, map_type):