Created
September 25, 2015 22:54
-
-
Save chrisgorgo/2ba7b0b12be7add1b6db to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pip install git+https://github.com/NeuroVault/pyneurovault | |
from pyneurovault import api | |
import numpy as np | |
all_collections = api.get_collections() | |
collections_with_dois = all_collections[np.logical_not(all_collections.DOI.isnull())] | |
images = api.get_images(collection_pks=list(collections_with_dois.collection_id)) | |
# Remove images that are thresholded | |
images = api.filter(df=images,column_name="is_thresholded",field_value=False) | |
# Not in MNI | |
images = api.filter(df=images,column_name="not_mni",field_value=False) | |
# Just fMRI bold | |
images = api.filter(df=images,column_name="modality",field_value="fMRI-BOLD") | |
# Download all images to file, resample to target | |
outfolder = "/Volumes/Samsung_T1/neurovault_niftis" | |
# If you don't want to resample | |
api.download_images(dest_dir = outfolder,images_df=images,resample=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment