ibllib.atlas.regions

Functions

regions_from_allen_csv

Reads csv file containing the ALlen Ontology and instantiates a BrainRegions object :return: BrainRegions object

Classes

BrainRegions

The Allen atlas ids are kept intact but lateralized as follows: labels are duplicated and ids multiplied by -1, with the understanding that left hemisphere regions have negative ids.

class BrainRegions(brainmap='Allen')[source]

Bases: ibllib.atlas.regions._BrainRegions

The Allen atlas ids are kept intact but lateralized as follows: labels are duplicated and ids multiplied by -1, with the understanding that left hemisphere regions have negative ids.

get(ids) iblutil.util.Bunch[source]

Get a bunch of the name/id

descendants(ids)[source]

Get descendants from one or an array of ids

Parameters

ids – np.array or scalar representing the region primary key

Returns

Bunch

ancestors(ids)[source]

Get ancestors from one or an array of ids

Parameters

ids – np.array or scalar representing the region primary key

Returns

Bunch

leaves()[source]

Get all regions that do not have children :return:

id: numpy.ndarray
name: object
acronym: object
rgb: numpy.uint8
level: numpy.ndarray
parent: numpy.ndarray
regions_from_allen_csv()[source]

Reads csv file containing the ALlen Ontology and instantiates a BrainRegions object :return: BrainRegions object