Repository navigation
Open
Description
This PR summarizes the ideas to implement for coreg:
Milestone 1.0
- increase fiducial picking performance (ENH: Coreg GUI #9689 (comment))
- add support for the
project_eegparameter - add support for the
scale_by_distanceparameter - add support for the
mark_insideparameter - console/status_bar idea to add to the UI whatever is printed in the terminal
- display dist estimation in mm.
- add units to UI (Omit more explicit message)
- display axes
- add tooltips as much as possible on widgets
- add support for the scaling parameters (WIP,ENH: new coreg gui features (part 3) #10117)
Bonus territory:
- checkbox for the MEG helmet
- add a slider to control transparency
- add a button to save the fiducials (Passing
transto mne.gui.coregistration() should automatically derive the MRI fiducials #10208 (comment)) - rename "Transform" groupbox into "HEAD <> MRI Transform"
- find a better name for the "Digitization Source" section (which could be confusing)
- show a dialog to save if
transis not saved (Coreg GUI should suggest to save fiducials and trans if not saved during interactive session #10236) - add a prompt check name already exists "overwrite or not"
Milestone 1.1
- add legend to plot alignment / coreg to see what colored points are etc.
- add support for (qdarkstyle) dark theme
- 📁 icon for file button widgets (instead of "Load")
- multiple threads should block window exit
- add support for
object_fit='contain'andobject_position='top'(ipywidgets) (How to get the correct event position when object_fit='contain'? Kitware/ipyvtklink#35, How to obtain the coordinates of a click on the image when object_fit='contain'? mwcraig/ipyevents#71)
Done
-
add support for the(YAGNI)guess_mri_subjectparameter -
add support for the(YAGNI)head_insideparameter - Update
Coregistration()to require parameters (https://mne.discourse.group/t/mne-coreg-based-on-ctf-data/3022/4) - make the sections collapsible (ipywidgets)
- Decouple GUI code from model (suggested in WIP: Generate subject fiducials #6693 (comment), done in MRG,ENH: Refactor coreg/traits classes #9516)
- Build a coreg GUI using
pyvista(done in ENH: Coreg GUI #9689)
Bugs
- the parameter spin boxes force 2 updates consecutively even though only one interaction is done
- multi-line labels are not supported (ipywidgets)
- Qt crashes during
_configure_status_bar()(Windows) - the app is abnormally slow at loading
FIFF(Windows) - inconsistent behaviour of checkbox layout (ipywidgets)
- the status bar does not support dark theme (qt) (Change CoregistrationUI status bar text color to black #10238 (comment))
- the spin boxes are not updated during ICP with scaling (MNT: _plot_glyphs slow on Windows #10377 (comment))
- the DigPoints are displayed with unlocked fiducials when switching subjects (MRG: Rework CoregistrationUI fiducial I/O widgets & add save button #10242 (comment))
- all HSPs become marked as inside the head surface on certain scaling values (WIP,ENH: some coreg features and fixes #10224 (comment))
- the app hangs when loading
trans(ipywidgets)
Activity
larsoner commentedon Oct 27, 2021
@GuillaumeFavelier as the next step, can you separate into blockers for 0.24 and non-blockers for 0.24, perhaps working with @agramfort and @hoechenberger ? To me it's just the initial-startup bug I added to the list.
GuillaumeFavelier commentedon Oct 27, 2021
Alright, I'll update the original post and take care of this bug in priority 👍
bloyl commentedon Oct 28, 2021
@GuillaumeFavelier - thanks so much for this refactoring. I'm really looking forward to leaving behind mayavi for coreg.
In updating some of my code, i ran into an issue with the auto coreg method and CTF data. CTF doesn't have unique HPIs (they use nas/lpa/rpa) and the current code assumes these are not None and tries to update them.
Below is an MWE that throws
This patch moves past the error allowing CLI coregistration, but I don't know how it interacts with the work you're doing in the GUI or if there is another way you would want to solve the issue so didn't want to open an separate PR.
Best,
Luke
bloyl commentedon Oct 29, 2021
The new gui also has a small backward compatibility issue.
The old mayavi GUI supported fif files that only contained dig points.
mne-python/mne/gui/_file_traits.py
Lines 310 to 318 in b579d32
The new gui has replaced this with a
read_meas_infocallmne-python/mne/gui/_coreg.py
Lines 335 to 336 in dac4f16
which crashes out on these files.
Let me know if you'd like a PR with these two bug fixes, I just don't want to complicate stuff you are already working on.
larsoner commentedon Oct 29, 2021
I'd say go for it @bloyl !
larsoner commentedon Oct 29, 2021
@GuillaumeFavelier given that we plan to cut 0.24 next week (preferably early), do you think the list above marked for 0.24 is realistic?
GuillaumeFavelier commentedon Oct 29, 2021
Indeed, early next week is unrealistic for all of those.
larsoner commentedon Oct 29, 2021
Okay, I'll bump those to 1.0. I think it's okay if a few of these features lag
hbk008 commentedon Nov 13, 2021
hoechenberger commentedon Nov 13, 2021
hbk008 commentedon Nov 13, 2021
hoechenberger commentedon Nov 13, 2021
hbk008 commentedon Nov 13, 2021
hoechenberger commentedon Nov 13, 2021
GuillaumeFavelier commentedon Mar 7, 2022
I removed the item:
assuming that it's among the parameters (
head_inside,guess_mri_subject, ...etc) that we do not need.