Skip to content

plot_alignment should show transparent brain when using sEEG electrodes #8445

@kdoelling1919

Description

@kdoelling1919

Describe the new feature or enhancement

Using plot_alignment to see where sEEG electrodes are located in the brain. But if you you use any brain surfaces such as surfaces=["pial"] the brain is fully opaque so you can't see where the electrodes are that are inside the brain. So it would be best to give the brain a bit of transparency when you have sEEG electrodes embedded in the brain.

Describe your proposed implementation

As far as I can tell, this is a single line change. I have already created a feature branch in my fork which changes the setting of opacity depending on whether there are sEEG electrodes present for plotting.
https://github.com/kdoelling1919/mne-python/blob/5b039cdfb3da64c89947f09a0bfd83481955f29c/mne/viz/_3d.py#L840

Describe possible alternatives

Another option might be to set transparency generally any time there are sensors to be plotted that are inside the brain volume. Sounds like a bit more work (and more knowledge about the surfaces than I currently have) but it would be more general.

Additional comments

Here is what the plot_alignment looks like in current master version of plot_alignment
master

Here is what it looks like in my branch.
transparent

If people agree this is useful beyond just for myself. I'll make the pull request.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions