""" # Retrieving the data # ------------------- # In this example we use the IBC dataset, which include a large number of # different contrasts maps for 12 subjects. We download the images for # subjects 1 and 2 (or retrieve them if they were already downloaded) # Files is the list of paths for each subjects. # df is a dataframe with metadata about each of them. # mask is an appropriate nifti image to select the data. # from fmralign.fetch_example_data import fetch_ibc_subjects_contrasts files, df, mask = fetch_ibc_subjects_contrasts(['sub-01', 'sub-02']) ############################################################################### # Defining a masker # ----------------- # Using the mask provided, define a nilearn masker that will be used # to handle relevant data. For more information, visit : # http://nilearn.github.io/manipulating_images/masker_objects.html # from nilearn.input_data import NiftiMasker masker = NiftiMasker(mask_img=mask) mask masker.fit()
""" ############################################################################### # Retrieve the data # ----------------- # In this example we use the IBC dataset, which includes a large number of # different contrasts maps for 12 subjects. # We download the images for subjects sub-01, sub-02, sub-04, sub-05, sub-06 # and sub-07 (or retrieve them if they were already downloaded). # imgs is the list of paths to available statistical images for each subjects. # df is a dataframe with metadata about each of them. # mask is a binary image used to extract grey matter regions. # from fmralign.fetch_example_data import fetch_ibc_subjects_contrasts imgs, df, mask_img = fetch_ibc_subjects_contrasts( ['sub-01', 'sub-02', 'sub-04', 'sub-05', 'sub-06', 'sub-07']) ############################################################################### # Definine a masker # ----------------- # We define a nilearn masker that will be used to handle relevant data. # For more information, visit : # 'http://nilearn.github.io/manipulating_images/masker_objects.html' # from nilearn.input_data import NiftiMasker masker = NiftiMasker(mask_img=mask_img).fit() ############################################################################### # Prepare the data # ----------------