FZJ-INM1-BDA / siibra-python

Software interfaces for interacting with brain atlases - Python client
Apache License 2.0
46 stars 8 forks source link

Fetching regional map of a higher level structure from desired granularity is not possible #372

Open AhmetNSimsek opened 1 year ago

AhmetNSimsek commented 1 year ago
import siibra  # as of v0.4a48
p = siibra.parcellations["julich 3.0"]
r = p.get_region("Subiculum (Hippocampus)")

# This will not go through the higher granularity since children of "Subiculum (Hippocampus)" are mapped in 157 region map.
r.fetch_regional_map("mni152", maptype="statistical")
AhmetNSimsek commented 1 year ago

Suggestion: add map_spec: str = "" keyword argument that adds the check for extra specififcation ie:

if (
    m.space.matches(fetch_space) and
    m.parcellation == self.parcellation and
    m.provides_image and
    m.maptype == maptype and
    self.name in m.regions and
    map_spec in m.name
):

@dickscheid, do you agree?