Visualizing 4D probabilistic atlas mapsΒΆ

This example shows how to visualize probabilistic atlases made of 4D images. There are 3 different display types:

  1. “contours”, which means maps or ROIs are shown as contours delineated by colored lines.
  2. “filled_contours”, maps are shown as contours same as above but with fillings inside the contours.
  3. “continuous”, maps are shown as just color overlays.

The nilearn.plotting.plot_prob_atlas function displays each map with each different color which are picked randomly from the colormap which is already defined.

See Plotting brain images for more information to know how to tune the parameters.

  • ../../_images/plot_prob_atlas_001.png
  • ../../_images/plot_prob_atlas_002.png
  • ../../_images/plot_prob_atlas_003.png
  • ../../_images/plot_prob_atlas_004.png
  • ../../_images/plot_prob_atlas_005.png
  • ../../_images/plot_prob_atlas_006.png
  • ../../_images/plot_prob_atlas_007.png
  • ../../_images/plot_prob_atlas_008.png
  • ../../_images/plot_prob_atlas_009.png
  • ../../_images/plot_prob_atlas_010.png

Python source code:

# Load 4D probabilistic atlases
from nilearn import datasets

# Harvard Oxford Atlas
harvard_oxford = datasets.fetch_atlas_harvard_oxford('cort-prob-2mm')
harvard_oxford_sub = datasets.fetch_atlas_harvard_oxford('sub-prob-2mm')

# Multi Subject Dictionary Learning Atlas
msdl = datasets.fetch_atlas_msdl()

# Smith ICA Atlas and Brain Maps 2009
smith = datasets.fetch_atlas_smith_2009()

# ICBM tissue probability
icbm = datasets.fetch_icbm152_2009()

# Visualization
import matplotlib.pyplot as plt
from nilearn import plotting

atlas_types = {'Harvard_Oxford': harvard_oxford.maps,
               'Harvard_Oxford sub': harvard_oxford_sub.maps,
               'MSDL': msdl.maps, 'Smith 2009 10 RSNs': smith.rsn10,
               'Smith2009 20 RSNs': smith.rsn20,
               'Smith2009 70 RSNs': smith.rsn70,
               'Smith2009 10 Brainmap': smith.bm10,
               'Smith2009 20 Brainmap': smith.bm20,
               'Smith2009 70 Brainmap': smith.bm70,
               'ICBM tissues': (icbm['wm'], icbm['gm'], icbm['csf'])}

for name, atlas in sorted(atlas_types.items()):

Total running time of the example: 18.36 seconds ( 0 minutes 18.36 seconds)