Visualizing only frontal lobe parcels according to HCP-MMP

I have to visualize frontal lobe parcels according to HCP-MMP, and I found this MNE-Python package for visualizing.

I am new with this thing and Is there a such way for doing this? I mean can I indicate specific brain parcels such as 9-46d, IFSa (region names according to HCP-MMP) etc. and see them visualized on brain.

I would use labels = mne.read_labels_from_annot(...) followed by creating a brain = mne.viz.Brain(...) object and using brain.add_label(...)

https://mne.tools/stable/generated/mne.read_labels_from_annot.html
https://mne.tools/stable/generated/mne.viz.Brain.html
https://mne.tools/stable/generated/mne.viz.Brain.html#mne.viz.Brain.add_label

for this specific code, mne.read_labels_from_annot() imports whole HCPMMP1 atlas, what is the way of importing only specific parcels?

Check the full description of the read_labels_from_annot there is a param in there regexp that allows you to be selective during read:

https://mne.tools/stable/generated/mne.read_labels_from_annot.html

Or if you want, the function just returns a list of mne.Label so you could always do something like

labels = read_labels_from_annot(...)
for label in labels:
    if "something" in label.name:
        brain.add_label(label)

or similar. You probably do not want the brain.add_parcellation(...) because this will already add all labels

This approach worked fine for me, thanks for your help


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.