Skip to content

Conversation

@GuillaumeFavelier
Copy link
Contributor

@GuillaumeFavelier GuillaumeFavelier commented Jan 26, 2021

This PR follows #8730 (comment) and will also implement other ideas to improve the Brain API.

ToDo:

  • Show the time label when the sliders are not visible (toggled off)
  • Shortcuts to move forward/backward in time
  • Shortcuts to rotate the brain along X/Y axis
  • Add all keyboard shorcuts in docstring

@GuillaumeFavelier GuillaumeFavelier self-assigned this Jan 26, 2021
@GuillaumeFavelier
Copy link
Contributor Author

@jasmainak you may be interested in this one :)

@larsoner
Copy link
Member

For the rotations it's important to clarify if the rotations occur along the x/y axis directions defined by the viewer, or the x/y defined by the brain/MRI. In other words, if I have a left hemi lateral view, and I press "up" a few times to tilt the brain along the y axis so that it "leans back" away from the camera, what happens when I press "left"? Does it rotate about the brain's z axis, or about the z axis of the viewer? This is similar to thinking about trackball (always relative to the viewer) versus terrain (always relative to a standard Z direction of the data).

@jasmainak
Copy link
Member

Awesome, I'm going to give it a try later today!

@jasmainak
Copy link
Member

jasmainak commented Jan 26, 2021

Okay so the time label looks excellent. I checked and it works also with the movie

What do you think of removing the legend in the time course plot and showing the vertex number as a tooltip or in a small panel below (same way that matplotlib shows coordinates)? I don't know if the MNI coordinates are actually useful? If they are, I'd suggest moving them to a panel below and you can get the info when mouseover-ing the time course

Also GFP plot appears really flat in pretty much any plot. Is it actually useful? I presume this is basically standard deviation across all source points? I couldn't find any information in the docstring. The flatness may also be due to the plot being really stretched out. One idea is to make the time course panel half in width and adding some info information and/or buttons on the other half. Or other kinds of plots like SNR ... I don't know

Also I have been playing around with the label extraction. It's a nice feature! But unfortunately the labels you get with the default parcellations are quite big and don't often align with the brain activity. In MNE-analyze, you can draw a label with the mouse cursor and look at the average time course in that label. Is this a feature folks would be interested in? I can raise a separate issue for it if so.

@GuillaumeFavelier
Copy link
Contributor Author

In MNE-analyze, you can draw a label with the mouse cursor and look at the average time course in that label

This one is noted in #7162 as "Interface for drawing ROIs using the mouse"

showing the vertex number as a tooltip or in a small panel below

PRs are welcome to implement this hover feature in the matplotlib canvas, I'll add it to the list 👍

We can continue to discuss about the rest in here of course.

@GuillaumeFavelier GuillaumeFavelier changed the title WIP: Improve Brain UX MRG: Improve Brain UX Jan 28, 2021
Copy link
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed a commit to change the keypress step size and directions to match mne_analyze, will merge once CIs come back happy!

@larsoner larsoner merged commit 74a7f32 into mne-tools:main Jan 29, 2021
@larsoner
Copy link
Member

Thanks @GuillaumeFavelier !

@GuillaumeFavelier GuillaumeFavelier deleted the mnt/improve_brain branch January 29, 2021 18:40
@jasmainak
Copy link
Member

Fantastic, thanks @GuillaumeFavelier !

@jasmainak
Copy link
Member

@GuillaumeFavelier I just gave this a try and found the following problems:

  • if I zoom in to the brain and then try to use the arrow buttons to turn the brain, it zooms out. I think this should not happen
  • when navigating in time, if I go beyond the allowed xlim, then it is not possible to come back. It's a bit of a nitpick but it's probably easy to fix that you don't allow the user to go beyond the allowed xlim

larsoner added a commit to adam2392/mne-python that referenced this pull request Feb 1, 2021
* upstream/main:
  MRG, ENH: Add warning about bad whitener conditioning (mne-tools#8805)
  MRG, MAINT: Deprecated param and pytest-qt (mne-tools#8808)
  fix mne.viz.plot_topomap with some missing grad in a pair (mne-tools#8817)
  [MRG] Coregistration-GUI:  use *.mff as digitization source (mne-tools#8790)
  FIX: Path
  [MRG] ENH EGI MFF reader:  populate info['dig'] (mne-tools#8789)
  MRG: Improve Brain UX (mne-tools#8792)
  FIX missing Axes3D import in viz._3d._plot_mpl_stc (mne-tools#8811)
  Better error message if configured download folder doesn't exist (mne-tools#8809)
  MRG, ENH: Add support for other formats to browse_raw (mne-tools#8807)
  MRG, BUG: Allow depth > 1 (mne-tools#8804)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants