siibra.core.atlas

Provides reference systems for brains.

Module Contents

Classes

Atlas

Main class for an atlas, providing access to feasible

Attributes

VERSION_BLACKLIST_WORDS

class siibra.core.atlas.Atlas(identifier: str, name: str, species: siibra.commons.Species)
Inheritance diagram of siibra.core.atlas.Atlas

Main class for an atlas, providing access to feasible combinations of available parcellations and reference spaces, as well as common functionalities of those.

property parcellations

Access a registry of parcellations supported by this atlas.

property spaces

Access a registry of reference spaces supported by this atlas.

find_regions(regionspec, all_versions=False, filter_children=True, **kwargs)

Find regions with the given specification in all parcellations offered by the atlas. Additional kwargs are passed on to Parcellation.find().

Parameters:
  • regionspec (str, regex, int, Region, MapIndex) –

    • 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

    • a Region object

  • 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.

Returns:

list of regions matching to the regionspec

Return type:

list[Region]

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:

Parcellation

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.

Parameters:

space (str, Space) – specification of a space or a space object

Return type:

Space

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:
  • space (Space, str) – The target reference space, or a string specification of the space

  • point1 (Tuple) – A 3D coordinate given in this reference space

  • point2 (Tuple) – Another 3D coordinate given in this reference space

Return type:

BoundingBox

siibra.core.atlas.VERSION_BLACKLIST_WORDS = ['beta', 'rc', 'alpha']