Note
Click here to download the full example code
Plot a cortical parcellation¶
In this example, we download the HCP-MMP1.0 parcellation 1 and show it
on fsaverage
.
We will also download the customized 448-label aparc parcellation from 2
Note
The HCP-MMP dataset has license terms restricting its use. Of particular relevance:
“I will acknowledge the use of WU-Minn HCP data and data derived from WU-Minn HCP data when publicly presenting any results or algorithms that benefitted from their use.”
References¶
- 1
Glasser MF et al. (2016) A multi-modal parcellation of human cerebral cortex. Nature 536:171-178.
- 2
Khan S et al. (2018) Maturation trajectories of cortical resting-state networks depend on the mediating frequency band. Neuroimage 174 57-68.
# Author: Eric Larson <larson.eric.d@gmail.com>
# Denis Engemann <denis.engemann@gmail.com>
#
# License: BSD (3-clause)
import mne
Brain = mne.viz.get_brain_class()
subjects_dir = mne.datasets.sample.data_path() + '/subjects'
mne.datasets.fetch_hcp_mmp_parcellation(subjects_dir=subjects_dir,
verbose=True)
mne.datasets.fetch_aparc_sub_parcellation(subjects_dir=subjects_dir,
verbose=True)
labels = mne.read_labels_from_annot(
'fsaverage', 'HCPMMP1', 'lh', subjects_dir=subjects_dir)
brain = Brain('fsaverage', 'lh', 'inflated', subjects_dir=subjects_dir,
cortex='low_contrast', background='white', size=(800, 600))
brain.add_annotation('HCPMMP1')
aud_label = [label for label in labels if label.name == 'L_A1_ROI-lh'][0]
brain.add_label(aud_label, borders=False)
Out:
Downloading https://files.osf.io/v1/resources/rxvq7/providers/osfstorage/5bf42e9f5603840018b25aba?action=download&direct&version=1 (1.3 MB)
0%| | Downloading : 0.00/1.26M [00:00<?, ?B/s]
9%|9 | Downloading : 120k/1.26M [00:00<00:00, 6.92MB/s]
34%|###4 | Downloading : 440k/1.26M [00:00<00:00, 7.11MB/s]
94%|#########3| Downloading : 1.18M/1.26M [00:00<00:00, 7.41MB/s]
100%|##########| Downloading : 1.26M/1.26M [00:00<00:00, 21.9MB/s]
Verifying hash 9e4d8d6b90242b7e4b0145353436ef77.
File saved as /home/circleci/mne_data/MNE-sample-data/subjects/fsaverage/label/lh.aparc_sub.annot.
Downloading https://files.osf.io/v1/resources/rxvq7/providers/osfstorage/5bf432e65603840018b25e5f?action=download&direct&version=1 (1.3 MB)
0%| | Downloading : 0.00/1.26M [00:00<?, ?B/s]
24%|##4 | Downloading : 312k/1.26M [00:00<00:00, 17.4MB/s]
100%|##########| Downloading : 1.26M/1.26M [00:00<00:00, 18.0MB/s]
100%|##########| Downloading : 1.26M/1.26M [00:00<00:00, 35.8MB/s]
Verifying hash dd6464db8e7762d969fc1d8087cd211b.
File saved as /home/circleci/mne_data/MNE-sample-data/subjects/fsaverage/label/rh.aparc_sub.annot.
Reading labels from parcellation...
read 181 labels from /home/circleci/mne_data/MNE-sample-data/subjects/fsaverage/label/lh.HCPMMP1.annot
We can also plot a combined set of labels (23 per hemisphere).
brain = Brain('fsaverage', 'lh', 'inflated', subjects_dir=subjects_dir,
cortex='low_contrast', background='white', size=(800, 600))
brain.add_annotation('HCPMMP1_combined')
We can add another custom parcellation
brain = Brain('fsaverage', 'lh', 'inflated', subjects_dir=subjects_dir,
cortex='low_contrast', background='white', size=(800, 600))
brain.add_annotation('aparc_sub')
Total running time of the script: ( 0 minutes 9.565 seconds)
Estimated memory usage: 16 MB