Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

nilearn.datasets.fetch_atlas_aal#

nilearn.datasets.fetch_atlas_aal(version='SPM12', data_dir=None, url=None, resume=True, verbose=1)[source]#

Download and returns the AAL template for SPM 12.

This Deterministic atlas is the result of an automated anatomical parcellation of the spatially normalized single-subject high-resolution T1 volume provided by the Montreal Neurological Institute (MNI) (D. L. Collins et al., 1998, Trans. Med. Imag. 17, 463-468, PubMed).

For more information on this dataset’s structure, see AAL template for SPM 12[1], and Tzourio-Mazoyer et al.[2].

Warning

The maps image (data.maps) contains 117 unique integer values defining the parcellation. However, these values are not consecutive integers from 0 to 116 as is usually the case in Nilearn. Therefore, these values shouldn’t be interpreted as indices for the list of label names. In addition, the region IDs are provided as strings, so it is necessary to cast them to integers when indexing.

For example, to get the name of the region corresponding to the region ID 5021 in the image, you should do:

# This should print 'Lingual_L'
data.labels[data.indices.index("5021")]

Conversely, to get the region ID corresponding to the label “Precentral_L”, you should do:

# This should print '2001'
data.indices[data.labels.index("Precentral_L")]
Parameters:
version{‘SPM12’, ‘SPM5’, ‘SPM8’}, default=’SPM12’

The version of the AAL atlas. Must be ‘SPM5’, ‘SPM8’, or ‘SPM12’.

data_dirpathlib.Path or str, optional

Path where data should be downloaded. By default, files are downloaded in a nilearn_data folder in the home directory of the user. See also nilearn.datasets.utils.get_data_dirs.

urlstr, default=None

URL of file to download. Override download URL. Used for test only (or if you setup a mirror of the data).

resumebool, default=True

Whether to resume download of a partly-downloaded file.

verboseint, default=1

Verbosity level (0 means no message).

Returns:
datasklearn.utils.Bunch

Dictionary-like object, keys are:

  • ‘maps’: str, path to nifti file containing the regions. The image has shape (91, 109, 91) and contains 117 unique integer values defining the parcellation. Please refer to the main description to see how to link labels to regions IDs.

  • ‘labels’: list of str, list of the names of the regions. This list has 116 names as ‘Background’ (label 0) is not included in this list. Please refer to the main description to see how to link labels to regions IDs.

  • ‘indices’: list of str, indices mapping ‘labels’ to values in the ‘maps’ image. This list has 116 elements. Since the values in the ‘maps’ image do not correspond to indices in labels, but rather to values in indices, the location of a label in the labels list does not necessary match the associated value in the image. Use the indices list to identify the appropriate image value for a given label (See main description above).

  • ‘description’: str, description of the atlas.

Notes

Licence: unknown.

References