atlas
behaviour.atlas
What a BrainAtlas record does: find its own volume and metadata files, and answer for its regions.
Attributes
| Name | Description |
|---|---|
| WHOLEBRAIN | The atlas a record names when it names none: one region and no files, so nothing is ever read for it. |
| logger |
Classes
| Name | Description |
|---|---|
| BrainAtlasBehaviour | A brain atlas record, with the properties its own data files answer. |
BrainAtlasBehaviour
behaviour.atlas.BrainAtlasBehaviour()A brain atlas record, with the properties its own data files answer.
SANDS entities are stored in self.terminology.entities — a schema-native dict[ParcellationEntityName, ParcellationEntity] produced by the loader (the entities slot uses inlined: true in the SANDS schema).
Construction reads nothing: a record loaded from the database, or named in passing by a network’s parcellation, is a statement about an atlas. of builds the atlas itself with its metadata read, and the region properties — region_labels, centers, get_label_by_lookup, create_terminology — read it on first use, so a record reached either way answers the same; a record whose files have been read carries the packaged terminology from then on.
Attributes
| Name | Description |
|---|---|
| centers | Region center coordinates as (N, 3) array. |
| metadata | Return this atlas itself as its LinkML metadata object. |
| metadata_file | Filesystem path to the atlas _dseg.yaml metadata file, or None for an atlas the database does not hold. |
| region_labels | Region labels sorted by SANDS lookupLabel. |
| volume | NIfTI image of the atlas parcellation volume. |
| volume_file | Filesystem path to the atlas parcellation volume, or None if not found. |
Methods
| Name | Description |
|---|---|
| create_terminology | Build terminology entities from the atlas volume if not already populated. |
| get_label_by_lookup | Return the region name for a given SANDS lookup label. |
| of | The atlas atlas names, with its metadata loaded. |
create_terminology
behaviour.atlas.BrainAtlasBehaviour.create_terminology()Build terminology entities from the atlas volume if not already populated.
get_label_by_lookup
behaviour.atlas.BrainAtlasBehaviour.get_label_by_lookup(lookup_id)Return the region name for a given SANDS lookup label.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| lookup_id | The lookupLabel value to match against the terminology entities. |
required |
Returns
| Name | Type | Description |
|---|---|---|
The matching entity name, or None if no entity has that lookup label. |
of
behaviour.atlas.BrainAtlasBehaviour.of(atlas=None, **entities)The atlas atlas names, with its metadata loaded.
Accepts a record of one, its name, or nothing — which means wholebrain, as does a record that names none and anything this cannot read slots off at all. A record’s other stated slots come along, and one whose metadata is already loaded is not read again. A name is matched in any case, and one several atlases share, Schaefer2018, is refused naming them and the entities that tell them apart unless the BIDS entities (seg="7Networks", scale="100") narrow it to one (:func:tvbo.data.registry.resolve). This is the constructor the runtime uses when it wants the atlas itself rather than a reference to one.