This is the class and function reference of nilearn. Please refer to the full user guide for further details, as the class and function raw specifications may not be enough to give full guidelines on their uses.
List of modules
Utilities to download NeuroImaging datasets
User guide: See the Dataset loading utilities section for further details.
fetch_adhd([n_subjects, data_dir, url, ...]) | Download and load the ADHD resting-state dataset. |
fetch_craddock_2011_atlas([data_dir, url, ...]) | Download and return file names for the Craddock 2011 parcellation |
fetch_haxby([data_dir, n_subjects, url, ...]) | Download and loads complete haxby dataset |
fetch_haxby_simple([data_dir, url, resume, ...]) | Download and load an example haxby dataset |
fetch_nyu_rest([n_subjects, sessions, ...]) | Download and loads the NYU resting-state test-retest dataset. |
fetch_icbm152_2009([data_dir, url, resume, ...]) | Download and load the ICBM152 template (dated 2009) |
fetch_msdl_atlas([data_dir, url, resume, ...]) | Download and load the MSDL brain atlas. |
fetch_yeo_2011_atlas([data_dir, url, ...]) | Download and return file names for the Yeo 2011 parcellation. |
load_harvard_oxford(atlas_name[, dirname, ...]) | Load Harvard-Oxford parcellation. |
Mathematical operations working on niimgs like -a (3+n)-D block of data, and an affine.
high_variance_confounds(niimgs[, ...]) | Return confounds signals extracted from input signals with highest variance. |
smooth(niimgs, fwhm) | Smooth images by applying a Gaussian filter. |
resample_img(niimg[, target_affine, ...]) | Resample a Nifti Image |
The nilearn.input_data module includes scikit-learn tranformers and tools to preprocess neuro-imaging data.
User guide: See the NiftiMasker: loading, masking and filtering section for further details.
NiftiMasker([mask, sessions, ...]) | Nifti data loader with preprocessing |
MultiNiftiMasker([mask, smoothing_fwhm, ...]) | Nifti data loader with preprocessing for multiple subjects |
NiftiLabelsMasker(labels_img[, ...]) | Extract labeled-defined region signals from images. |
NiftiMapsMasker(maps_img[, mask_img, ...]) | Extract maps-defined region signals from images. |
Utilities to compute a brain mask from EPI images
User guide: See the Masking the data: from 4D image to 2D array section for further details.
compute_epi_mask(epi_img[, lower_cutoff, ...]) | Compute a brain mask from fMRI data in 3D or 4D ndarrays. |
compute_multi_epi_mask(epi_imgs[, ...]) | Compute a common mask for several sessions or subjects of fMRI data. |
intersect_masks(mask_imgs[, threshold, ...]) | Compute intersection of several masks |
apply_mask(niimgs, mask_img[, dtype, ...]) | Extract signals from images using specified mask. |
unmask(X, mask_img[, order]) | Take masked data and bring them back into 3D/4D |
Functions for extracting region-defined signals.
Two ways of defining regions are supported: as labels in a single 3D image, or as weights in one image per region (maps).
User guide: See the Extraction of signals from regions: NiftiLabelsMasker, NiftiMapsMasker. section for further details.
img_to_signals_labels(niimgs, labels_img[, ...]) | Extract region signals from image. |
signals_to_img_labels(signals, labels_img[, ...]) | Create image from region signals defined as labels. |
img_to_signals_maps(niimgs, maps_img[, mask_img]) | Extract region signals from image. |
signals_to_img_maps(region_signals, maps_img) | Create image from region signals defined as maps. |
Decoding tools and algorithms
SearchLight(mask_img[, process_mask_img, ...]) | Implement search_light analysis using an arbitrary type of classifier. |
Preprocessing functions for time series.
All functions in this module should take X matrices with samples x features
clean(signals[, detrend, standardize, ...]) | Improve SNR on masked fMRI signals. |
high_variance_confounds(series[, ...]) | Return confounds time series extracted from series with highest variance. |
butterworth(signals, sampling_rate[, ...]) | Apply a low-pass, high-pass or band-pass Butterworth filter |