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_neurovault_ids#

nilearn.datasets.fetch_neurovault_ids(collection_ids=(), image_ids=(), mode='download_new', data_dir=None, fetch_neurosynth_words=False, resample=False, vectorize_words=True, verbose=3)[source]#

Download specific images and collections from neurovault.org.

Any downloaded data is saved on the local disk and subsequent calls to this function will first look for the data locally before querying the server for more if necessary.

This is the fast way to get the data from the server if we already know which images or collections we want.

For more information, see 1, and 2.

Parameters
collection_idsContainer, optional

The ids of whole collections to be downloaded. Default=().

image_idsContainer, optional

The ids of particular images to be downloaded. The metadata for the corresponding collections is also downloaded. Default=().

mode{‘download_new’, ‘overwrite’, ‘offline’}, optional

When to fetch an image from the server rather than the local disk. Default=’download_new’.

  • ‘download_new’ (the default) means download only files that are not already on disk (regardless of modify date).

  • ‘overwrite’ means ignore files on disk and overwrite them.

  • ‘offline’ means load only data from disk; don’t query server.

data_dirstr, optional

The directory we want to use for nilearn data. A subdirectory named “neurovault” will contain neurovault data.

fetch_neurosynth_wordsbool, optional

Whether to collect words from Neurosynth. Default=False.

resamplebool, optional (default=False)

Resamples downloaded images to a 3x3x3 grid before saving them, to save disk space.

vectorize_wordsbool, optional

If neurosynth words are downloaded, create a matrix of word counts and add it to the result. Also add to the result a vocabulary list. See sklearn.CountVectorizer for more info. Default=True.

verboseint, optional

An integer in [0, 1, 2, 3] to control the verbosity level. Default=3.

Returns
Bunch

A dict-like object which exposes its items as attributes. It contains:

  • ‘images’, the paths to downloaded files.

  • ‘images_meta’, the metadata for the images in a list of dictionaries.

  • ‘collections_meta’, the metadata for the collections.

  • ‘description’, a short description of the Neurovault dataset.

If fetch_neurosynth_words and vectorize_words were set, it also contains:

  • ‘vocabulary’, a list of words

  • ‘word_frequencies’, the weight of the words returned by neurosynth.org for each image, such that the weight of word vocabulary[j] for the image found in images[i] is word_frequencies[i, j]

See also

nilearn.datasets.fetch_neurovault

Fetch data from Neurovault, but use filters on metadata to select images and collections rather than giving explicit lists of ids.

Notes

Images and collections from disk are fetched before remote data.

In download_new mode, if a file exists on disk, it is not downloaded again, even if the version on the server is newer. Use overwrite mode to force a new download.

Stops early if too many images fail to be downloaded in a row.

References

1

Krzysztof J. Gorgolewski, Gael Varoquaux, Gabriel Rivera, Yannick Schwarz, Satrajit S. Ghosh, Camille Maumet, Vanessa V. Sochat, Thomas E. Nichols, Russell A. Poldrack, Jean-Baptiste Poline, Tal Yarkoni, and Daniel S. Margulies. Neurovault.org: a web-based repository for collecting and sharing unthresholded statistical maps of the human brain. Frontiers in Neuroinformatics, 9:8, 2015. URL: https://www.frontiersin.org/article/10.3389/fninf.2015.00008, doi:10.3389/fninf.2015.00008.

2

Tal Yarkoni, Russell A Poldrack, Thomas E Nichols, David C Van Essen, and Tor D Wager. Large-scale automated synthesis of human functional neuroimaging data. Nature methods, 8(8):665–670, 2011.

Examples using nilearn.datasets.fetch_neurovault_ids#

NeuroVault meta-analysis of stop-go paradigm studies.

NeuroVault meta-analysis of stop-go paradigm studies.

NeuroVault meta-analysis of stop-go paradigm studies.