Visualizing multiscale functional brain parcellations

This example shows how to download and fetch brain parcellations of multiple networks using nilearn.datasets.fetch_atlas_basc_multiscale_2015 and visualize them using plotting function nilearn.plotting.plot_roi.

We show here only three different networks of ‘symmetric’ version. For more details about different versions and different networks, please refer to its documentation.

Retrieving multiscale group brain parcellations

# import datasets module and use `fetch_atlas_basc_multiscale_2015` function
from nilearn import datasets

parcellations = [
    datasets.fetch_atlas_basc_multiscale_2015(version="sym", resolution=64),
    datasets.fetch_atlas_basc_multiscale_2015(version="sym", resolution=197),
    datasets.fetch_atlas_basc_multiscale_2015(version="sym", resolution=444),
]

# We show here networks of 64, 197, 444
networks_64 = parcellations[0]["maps"]
networks_197 = parcellations[1]["maps"]
networks_444 = parcellations[2]["maps"]
[get_dataset_dir] Dataset created in
/home/runner/nilearn_data/basc_multiscale_2015
[fetch_single_file] Downloading data from
https://ndownloader.figshare.com/files/1861819 ...
[fetch_single_file]  ...done. (1 seconds, 0 min)

[uncompress_file] Extracting data from
/home/runner/nilearn_data/basc_multiscale_2015/5fd26f33e54da6efc0bc7eca321ad622/
1861819...
[uncompress_file] .. done.

[get_dataset_dir] Dataset found in
/home/runner/nilearn_data/basc_multiscale_2015
[get_dataset_dir] Dataset found in
/home/runner/nilearn_data/basc_multiscale_2015

Visualizing brain parcellations

# import plotting module and use `plot_roi` function, since the maps are in 3D
from nilearn import plotting

# The coordinates of all plots are selected automatically by itself
# We manually change the colormap of our choice
plotting.plot_roi(
    networks_64, cmap=plotting.cm.bwr, title="64 regions of brain clusters"
)

plotting.plot_roi(
    networks_197, cmap=plotting.cm.bwr, title="197 regions of brain clusters"
)

plotting.plot_roi(
    networks_444, cmap=plotting.cm.bwr_r, title="444 regions of brain clusters"
)

plotting.show()
  • plot multiscale parcellations
  • plot multiscale parcellations
  • plot multiscale parcellations

Total running time of the script: (0 minutes 4.078 seconds)

Estimated memory usage: 147 MB

Gallery generated by Sphinx-Gallery