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_icbm152_brain_gm_mask¶
- nilearn.datasets.fetch_icbm152_brain_gm_mask(data_dir=None, threshold=0.2, resume=True, n_iter=2, verbose=1)[source]¶
Download ICBM152 template first, then loads the ‘gm’ mask.
The default template of fMRIPrep is the asymmetrical ICBM152 2009, release c (MNI152NLin2009cSAsym). The NiLearn template is asymmetrical ICBM152 2009, release a. If you wish to use the exact same release as fMRIPrep, please refer to TemplateFlow (https://www.templateflow.org/).
Added in version 0.2.5.
- Parameters:
- data_dir
pathlib.Path
orstr
, 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 alsonilearn.datasets.utils.get_data_dirs
.- thresholdfloat, default=0.2
Values of the ICBM152 grey-matter template above this threshold will be included.
- resume
bool
, default=True Whether to resume download of a partly-downloaded file.
- n_iter: int, default=2
Number of repetitions of dilation and erosion steps performed in scipy.ndimage.binary_closing function.
Added in version 0.8.1.
- verbose
int
, default=1 Verbosity level (0 means no message).
- data_dir
- Returns:
- gm_mask_imgNifti1Image, image corresponding to the brain grey matter
from ICBM152 template.
See also
nilearn.datasets.fetch_icbm152_2009
for details regarding the ICBM152 template.
nilearn.datasets.load_mni152_template
for details about version of MNI152 template and related.
Notes
This function relies on ICBM152 templates where we particularly pick grey matter template and threshold the template at .2 to take one fifth of the values. Then, do a bit post processing such as binary closing operation to more compact mask image.
Note
It is advised to check the mask image with your own data processing.
Examples using nilearn.datasets.fetch_icbm152_brain_gm_mask
¶
Understanding parameters of the first-level model
Voxel-Based Morphometry on OASIS dataset