Skip to content

Commit

Permalink
bugfix: fsaverage internal identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
xgui3783 committed Mar 25, 2022
1 parent 76b6087 commit bcd32ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions siibra/core/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def to_model(self, detail=False, space: Space=None, **kwargs) -> ParcellationEnt
)

from .. import parcellations
from ..volumes import VolumeSrc, NeuroglancerVolume
from ..volumes import VolumeSrc, NeuroglancerVolume, GiftiSurfaceLabeling
from .datasets import EbrainsDataset

if space is not None:
Expand Down Expand Up @@ -893,7 +893,11 @@ def vol_to_id_dict(vol: VolumeSrc):
self_volumes = [vol for vol in self.volumes if vol.space is space]
parc_volumes = [vol for vol in self.parcellation.volumes if vol.space is space]

len_vol_in_space = len([v for v in [*self_volumes, *parc_volumes] if isinstance(v, NeuroglancerVolume)])
len_vol_in_space = len([v
for v in [*self_volumes, *parc_volumes]
if isinstance(v, NeuroglancerVolume)
or isinstance(v, GiftiSurfaceLabeling)
])
internal_identifier = "unknown"
if (
(len_vol_in_space == 1 and self.index.map is None)
Expand Down
1 change: 1 addition & 0 deletions test/core/test_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def test_has_inspired_by(parc_spec, region_spec, space_spec):
('julich 2.9', "hoc1", "big brain", True),
('julich 2.9', "hoc1", "mni152", False),
('julich 2.9', "hoc1 left", "mni152", True),
('julich 2.9', "hoc1 left", "fsaverage", True),

('julich 2.9', "fp1", "big brain", False),
('julich 2.9', "fp1", "mni152", False),
Expand Down

0 comments on commit bcd32ea

Please sign in to comment.