8.2.15. Loading and plotting of a cortical surface atlas

The Destrieux parcellation (Destrieux et al, 2010) in fsaverage5 space as distributed with Freesurfer is used as the chosen atlas.

The nilearn.plotting.plot_surf_roi function is used to plot the parcellation on the pial surface.

See Plotting brain images for more details.

8.2.15.1. References

Destrieux et al, (2010). Automatic parcellation of human cortical gyri and sulci using standard anatomical nomenclature. NeuroImage, 53, 1. URL http://dx.doi.org/10.1016/j.neuroimage.2010.06.010.

8.2.15.2. Data fetcher

# Retrieve destrieux parcellation in fsaverage5 space from nilearn
from nilearn import datasets

destrieux_atlas = datasets.fetch_atlas_surf_destrieux()

# The parcellation is already loaded into memory
parcellation = destrieux_atlas['map_left']

# Retrieve fsaverage5 surface dataset for the plotting background. It contains
# the surface template as pial and inflated version and a sulcal depth maps
# which is used for shading
fsaverage = datasets.fetch_surf_fsaverage()

# The fsaverage dataset contains file names pointing to the file locations
print('Fsaverage5 pial surface of left hemisphere is at: %s' %
      fsaverage['pial_left'])
print('Fsaverage5 inflated surface of left hemisphere is at: %s' %
      fsaverage['infl_left'])
print('Fsaverage5 sulcal depth map of left hemisphere is at: %s' %
      fsaverage['sulc_left'])

Out:

Fsaverage5 pial surface of left hemisphere is at: /home/kshitij/workspace/nilearn-org/nilearn-repo/master/nilearn/nilearn/datasets/data/fsaverage5/pial.left.gii.gz
Fsaverage5 inflated surface of left hemisphere is at: /home/kshitij/workspace/nilearn-org/nilearn-repo/master/nilearn/nilearn/datasets/data/fsaverage5/pial_inflated.left.gii.gz
Fsaverage5 sulcal depth map of left hemisphere is at: /home/kshitij/workspace/nilearn-org/nilearn-repo/master/nilearn/nilearn/datasets/data/fsaverage5/sulc.left.gii.gz

8.2.15.3. Visualization

# Display Destrieux parcellation on fsaverage5 pial surface using nilearn
from nilearn import plotting

plotting.plot_surf_roi(fsaverage['pial_left'], roi_map=parcellation,
                       hemi='left', view='lateral',
                       bg_map=fsaverage['sulc_left'], bg_on_data=True,
                       darkness=.5)
../../_images/sphx_glr_plot_surf_atlas_001.png

Display Destrieux parcellation on inflated fsaverage5 surface

plotting.plot_surf_roi(fsaverage['infl_left'], roi_map=parcellation,
                       hemi='left', view='lateral',
                       bg_map=fsaverage['sulc_left'], bg_on_data=True,
                       darkness=.5)
../../_images/sphx_glr_plot_surf_atlas_002.png

Display Destrieux parcellation with different views: posterior

plotting.plot_surf_roi(fsaverage['infl_left'], roi_map=parcellation,
                       hemi='left', view='posterior',
                       bg_map=fsaverage['sulc_left'], bg_on_data=True,
                       darkness=.5)
../../_images/sphx_glr_plot_surf_atlas_003.png

Display Destrieux parcellation with different views: ventral

plotting.plot_surf_roi(fsaverage['infl_left'], roi_map=parcellation,
                       hemi='left', view='ventral',
                       bg_map=fsaverage['sulc_left'], bg_on_data=True,
                       darkness=.5)
plotting.show()
../../_images/sphx_glr_plot_surf_atlas_004.png

8.2.15.4. 3D visualization in a web browser

An alternative to nilearn.plotting.plot_surf_roi is to use nilearn.plotting.view_surf for more interactive visualizations in a web browser. See 3D Plots of statistical maps or atlases on the cortical surface for more details.

view = plotting.view_surf(fsaverage.infl_left, parcellation,
                          cmap='gist_ncar', symmetric_cmap=False)
# uncomment this to open the plot in a web browser:
# view.open_in_browser()

In a Jupyter notebook, if view is the output of a cell, it will be displayed below the cell

view

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

Generated by Sphinx-Gallery