# How to add parcel names on parcels with mne.viz.Brain

**URL:** <https://mne.discourse.group/t/how-to-add-parcel-names-on-parcels-with-mne-viz-brain/8585>\
**Category:** Support & Discussions\
**Created:** [April 2, 2024, 11:48am UTC](https://mne.discourse.group/t/how-to-add-parcel-names-on-parcels-with-mne-viz-brain/8585 "2024-04-02T11:48:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![egemen4552](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@egemen4552](https://mne.discourse.group/u/egemen4552)\
**Post date:** [April 2, 2024, 11:48am UTC](https://mne.discourse.group/t/how-to-add-parcel-names-on-parcels-with-mne-viz-brain/8585/1 "2024-04-02T11:48:31Z")

</div>

I have used the following method to visualize brain parcels, but I want to add parcel names in addition to parcels.

What I want is for example for “IFSa” parcel I want to see the label name of that parcel on IFSa parcel.

Which method I shall follow for the desired modification?

# **Code:**

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”)

parcels\_to\_visualize = [  
“L\_SFL\_ROI-lh”,  
“L\_33pr\_ROI-lh”,  
“L\_p32pr\_ROI-lh”,  
“L\_a24\_ROI-lh”,  
“L\_8BM\_ROI-lh”,  
“L\_8Av\_ROI-lh”,  
“L\_8Ad\_ROI-lh”,  
“L\_8BL\_ROI-lh”,  
“L\_8C\_ROI-lh”,  
“L\_44\_ROI-lh”,  
“L\_IFJa\_ROI-lh”,  
“L\_IFSp\_ROI-lh”,  
“L\_46\_ROI-lh”,  
“L\_p9-46v\_ROI-lh”,  
“L\_47s\_ROI-lh”,  
“L\_s6-8\_ROI-lh”,  
“L\_25\_ROI-lh”,  
“L\_a24pr\_ROI-lh”,  
“L\_FOP4\_ROI-lh”,  
“L\_AVI\_ROI-lh”,  
“L\_FOP5\_ROI-lh”,  
“L\_a32pr\_ROI-lh”,  
“L\_p24\_ROI-lh”,  
]

for parcel\_name in parcels\_to\_visualize:  
parcel\_label = [label for label in labels if label.name == parcel\_name][0]  
brain.add\_label(parcel\_label, borders=False)

brain.show()

# **Result:**

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/2/2daac4c0e9611a27c6a2e05819397275246be73b.jpeg)
