siibra.core.atlas
Provides reference systems for brains.
Attributes
Classes
Main class for an atlas, providing access to feasible |
Module Contents
- class siibra.core.atlas.Atlas(identifier: str, name: str, species: siibra.commons.Species, **kwargs)
Main class for an atlas, providing access to feasible combinations of available parcellations and reference spaces, as well as common functionalities of those.
- find_regions(regionspec: str, all_versions: bool = False, filter_children: bool = True, find_topmost: bool = False)
Find regions with the given specification in all parcellations offered by the atlas.
- Parameters:
regionspec (str, regex) –
a string with a possibly inexact name (matched both against the name and the identifier key)
a string in ‘/pattern/flags’ format to use regex search (acceptable flags: aiLmsux, see at https://docs.python.org/3/library/re.html#flags)
a regex applied to region names
all_versions (Bool, default: False) – If True, matched regions for all versions of a parcellation are returned.
filter_children (bool, default: True) – If False, children of matched parents will be returned.
find_topmost (bool, default: False) – If True (requires filter_children=True), will return parent structures if all children are matched, even though the parent itself might not match the specification.
- Returns:
list of regions matching to the regionspec
- Return type:
- get_map(space: siibra.core.space.Space = None, parcellation: siibra.core.parcellation.Parcellation = None, maptype: siibra.commons.MapType = MapType.LABELLED)
Returns a parcellation map in the given space.
- Parameters:
space (Space) – The requested reference space. If None, the default is used.
parcellation (Parcellation) – The requested parcellation. If None, the default is used.
maptype (MapType) – Type of the map (labelled or statistical/probabilistic)
- Return type:
ParcellationMap
- get_parcellation(parcellation=None) siibra.core.parcellation.Parcellation
Returns a valid parcellation object defined by the atlas. If no specification is provided, the default is returned.
- Parameters:
parcellation (str, Parcellation) – specification of a parcellation or a parcellation object
- Return type:
- get_region(region, parcellation=None)
Returns a valid Region object matching the given specification.
- Parameters:
region (str or Region) – Key, approximate name, id or instance of a brain region
parcellation (str or Parcellation) – Key, approximate name, id or instance of a brain parcellation. If None, the default is used.
- get_space(space=None) siibra.core.space.Space
Returns a valid reference space object defined by the atlas. If no specification is provided, the default is returned.
- get_template(space: siibra.core.space.Space = None, variant: str = None)
Returns the reference template in the desired reference space. If no reference space is given, the default from Atlas.space() is used.
- Parameters:
space (Space) – The desired reference space
variant (str (optional)) – Some templates are provided in different variants, e.g. freesurfer is available as either white matter, pial or inflated surface for left and right hemispheres (6 variants). This field could be used to request a specific variant. Per default, the first found variant is returned.
- get_voi(space: siibra.core.space.Space, point1: tuple, point2: tuple)
Get a volume of interest spanned by two points in the given reference space.
- Parameters:
- Return type:
- property parcellations
Access a registry of parcellations supported by this atlas.
- property spaces
Access a registry of reference spaces supported by this atlas.
- siibra.core.atlas.VERSION_BLACKLIST_WORDS = ['beta', 'rc', 'alpha']