Skip to content

ENH: add overlay Brain GUI#14031

Open
payamsash wants to merge 1 commit into
mne-tools:mainfrom
payamsash:enh/brain-overlay-selector
Open

ENH: add overlay Brain GUI#14031
payamsash wants to merge 1 commit into
mne-tools:mainfrom
payamsash:enh/brain-overlay-selector

Conversation

@payamsash

Copy link
Copy Markdown
Contributor

Reference issue (if any)

following #13995 and "We also have an issue with interactivity, in that the Brain interface can have widgets that control colorbar limits for example. So we'll want to add a "data key" (maybe there is some better name?) drop-down there that allows controlling the limits for the given key / set of data, and we'll need some private var to track the currently "active" (meaning: colorbar is the one shown, and the limits / smoothing etc. changed by GUI interaction) data key."

What does this implement/fix?

Add a box next to the "Color Limits", (it should be hidden when there's only one overlay), switching it should update _active_data_key and refresh the fmin/fmid/fmax/smoothing sliders. so when add_data(remove_existing=False) is called after the viewer is already open, the box should update its items. but we'd need to add a small set_items(items) method to _AbstractWdgt and put it in both _qt.py and _notebook.py, because now the set_range calls setRange(min, max) which is numeric-only and not compatible with QComboBox.

not sure if there's a simpler way? @larsoner

Additional information

I'll probably use Claude AI for code review.

@larsoner

larsoner commented Jul 8, 2026

Copy link
Copy Markdown
Member

Feel free to ping me when to look or try!

Bonus points if you update an example to show this... maybe use multiple (dSPM, sLORETA, eLORETA?) solvers in https://mne.tools/stable/auto_tutorials/inverse/30_mne_dspm_loreta.html and overlay them with some suitable alpha and different colormaps (red/green/blue?). It could make for a cool visualization at the end of the example, and then easy to test interactively. But not obligatory if you have other ideas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants