Skip to content

Commit 803e4e5

Browse files
Merge pull request #215 from naplab/coordinates_and_atlases_for_brainplots
Create atlas and coordinate_space distinction in naplib.localization.Brain object. Add ability to load additional brain atlas parcellations as .annot files. Add ability to map brain overlays onto atlas parcels.
2 parents 4a3be0d + 0c26828 commit 803e4e5

3 files changed

Lines changed: 217 additions & 215 deletions

File tree

examples/brain_plotting/plot_intracranial_electrodes.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,21 @@
123123
plt.show()
124124

125125
###############################################################################
126-
# Directly plot Destrieux Atlas region labels overlaid on the brain
126+
# Plot default Destrieux Atlas region labels overlaid on the brain
127127
brain = Brain('pial', subject_dir='./fsaverage/')
128128

129129
brain.lh.overlay = brain.lh.labels
130130
brain.rh.overlay = brain.rh.labels
131131

132-
fig, axes = plot_brain_overlay(brain, cmap='tab20', vmin=1, vmax=75)
132+
fig, axes = plot_brain_overlay(brain, cmap='tab20')
133+
plt.show()
134+
135+
###############################################################################
136+
# Load and plot Glasser Atlas region labels overlaid on the brain
137+
brain = Brain('pial', atlas='HCPMMP1', subject_dir='./fsaverage/')
138+
139+
brain.lh.overlay = brain.lh.labels
140+
brain.rh.overlay = brain.rh.labels
141+
142+
fig, axes = plot_brain_overlay(brain, cmap='prism')
133143
plt.show()

0 commit comments

Comments
 (0)