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]#
Downloads 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 1, and 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’}, optional
The version of the AAL atlas. Must be ‘SPM5’, ‘SPM8’, or ‘SPM12’. Default=’SPM12’.
- data_dir
pathlib.Path
orstr
, optional Path where data should be downloaded. By default, files are downloaded in home directory.
- url
str
, optional URL of file to download. Override download URL. Used for test only (or if you setup a mirror of the data). Default=None.
- resume
bool
, optional Whether to resume download of a partly-downloaded file. Default=True.
- verbose
int
, optional Verbosity level (0 means no message). Default=1.
- Returns
- data
sklearn.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
ofstr
, 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
ofstr
, 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 inlabels
, but rather to values inindices
, the location of a label in thelabels
list does not necessary match the associated value in the image. Use theindices
list to identify the appropriate image value for a given label (See main description above).‘description’:
str
, description of the atlas.
- data
Notes
Licence: unknown.
References
- 1
Aal template for spm 12. http://www.gin.cnrs.fr/AAL-217?lang=en. Accessed: 2021-05-19.
- 2
N. Tzourio-Mazoyer, B. Landeau, D. Papathanassiou, F. Crivello, O. Etard, N. Delcroix, B. Mazoyer, and M. Joliot. Automated anatomical labeling of activations in spm using a macroscopic anatomical parcellation of the mni mri single-subject brain. NeuroImage, 15(1):273–289, 2002. URL: https://www.sciencedirect.com/science/article/pii/S1053811901909784, doi:https://doi.org/10.1006/nimg.2001.0978.