mne-python
mne-python copied to clipboard
13204: Fix label border rendering issue on flat brain surfaces
Reference issue
Fixes #13204.
What does this implement/fix?
This pull request addresses an issue where label borders could not be rendered correctly on flat brain surfaces during 3D plotting. Attempting to render borders in this context previously led to errors or misleading visuals.
Changes include:
- A conditional check to detect flat surfaces (
is_flat). - Emitting a warning when
borders=Trueon flat surfaces:
"Label borders cannot be displayed on flat surfaces. Skipping borders." - Skipping border rendering entirely if the surface is flat.
- Added a test to ensure the warning is correctly raised and handled.
Additional information
This fix improves visualization reliability and provides informative user feedback when label borders are incompatible with flat surface rendering.
There seem to be other changed mixed in with the PR.
There seem to be other changed mixed in with the PR.
Thanks for pointing that out! Those changes weren’t meant to be part of this PR — I’ll clean it up and push an update shortly.
@larsoner please have a look.