-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing trans
to mne.gui.coregistration() should automatically derive the MRI fiducials
#10208
Comments
You mean that the digitized head space ones should be transformed to MRI coordinates? I disagree. I think for every MRI, someone should ideally manually click on the head where the fids are. There will be some error in every head digitization, and this should generally be higher than what you get with a manual click on the right location on the head surface. |
I think there's some confusion here either on my or on your side 😅 Or my workflow is non-standard. I'll try to explain in the following what my issues are with the current implementation.
Now I realized that
So currently there's no way for @SophieHerbst to review my work and "pick up where I left off" – well, alright, there's this functionality to save and load fiducials in the GUI, but this would complicate things much more than necessary IMHO. I hope this made things a little clearer? Also happy to have a quick video call to discuss this! |
There should be a step 4.5 here where you click the "save" button. In other words, your manually-clicked-on-the-dense-head-surface MRI fiducial points should be the most accurate ones available, EDIT: and they should be saved to
Instead of saving the digitized-fiducial-points-transformed-to-MRI-space, you should save/use the above.
If you saved the BIDS dataset properly with the MRI-coordinate fiducials (ideally not transformed from dig, but manually placed, as I suggest above) then to me MNE-BIDS should write |
... in other words, the "standard workflow" as I understand it is for any given MRI, you click once accurately EDIT: then clicke "save" to make the |
Thanks @larsoner, I didn't know MNE would auto-retrieve the fiducials then. Still, I'm not happy 🙈 In BIDS, I cannot store a transformation matrix. So what we have in BIDS metadata is:
Currently (i.e., current MNE-BIDS workflow!) these two sets of points implicitly determine the transformation matrix: we derive it from the two via To store a transformation, I therefore have to
Only then will I be able to later retrieve the transformation matrix again. Does my problem become a little clearer? cc @sappelhoff |
This should be enough to create
This to me deviates from the standard processing stream. The fiducials in MRI coordinates do not necessarily have to match exactly (i.e., be I assume in practice what happens is that some manual or ICP
... to me this is still a problem with MNE-BIDS deviating from the standard coreg workflow, rather than a problem with MNE-Python. I don't know why the decision was made to implicitly rather than explicitly store the trans (?), but in every dataset I've worked with, the I'd rather not make it easier for people (in MNE-Python at least) to take the digitized fiducials and transform them to MRI space using a supplied If it's too late to find a different way to store the |
Thanks for the explanation, @larsoner!
Yes, this is exactly what we're doing
It appears we're actually hitting a limitation of the BIDS specification here, then. We could add a convenience function to MNE-BIDS to create Bummer. |
Indeed -- to add to what you wrote above, just to summarize:
Indeed it sounds like there is no way to store this additional information of the manually-specified MRI fiducials (independent of any digitization procedure), and no way to store
I'm not sure this solves the problem -- if your goal is to allow you really want your collaborator to be able to check/recreate your experience, I think you need to give them your manually created If you don't care about this loss of information, then we should just make sure at the MNE-Python end that doing |
I may have found a way to store the information in a BIDS-conforming way: … so I'm thinking we could store both the "true" coordinates as well as those derived by applying the head<>MRI transform in the anatomical metadata. This would only require some (small-ish) adjustments in MNE-BIDS. |
Great! |
Let's keep this open until I can confirm that my idea actually works ;) |
I only see a single To quote the long-term user of MNE, @SophieHerbst: "I didn't know you could even save those fiducials." Exact same goes for me, and I've actually been getting paid to work on MNE for almost 2 years straight now … Call me a bad performer, but I believe we really need to rework this behavior of the coreg UI, it's not at all obvious, even to experienced users. |
Just to clarify, which functions would use these saved mri fiducials other than the co-reg gui? |
plot_alignment also uses them if you do mri_fiducials=True IIRC There was a (fairly visible and in the same space as the lpa/Marion/rpa radio buttons) button to save in the old Mayavi/Traits user interface, perhaps it's missing from the new one |
Ah! This could explain it. Yes it's definitely not there! :) |
I updated #8833 with the feature request:
|
@GuillaumeFavelier Looking at the code, I believe the fiducials file is currently saved automatically once the fiducials have been placed, is this correct? If yes, we should discuss whether we'd even want a save button. |
When I've run FWIW I don't think it should auto-save -- I think there should be a |
@larsoner I guess you're right, we should have a button and not auto-save in any case. |
Hm... What function are you refering to? At the moment, the only function saving fiducials should be
We do not have a way to specify the path to load the fiducials in the command line with
Anyway, I already added the feature request/suggestion to #8833 so I'll look into it. Considering the issue is open, I'll give it higher priority then 👍 |
Correct, and YAGNI. The standard location |
I'm closing since I think we've taken care of the points in this issue, but feel free to reopen if I'm mistaken @hoechenberger |
All good, thanks @larsoner |
Currently, the following code will estimate the fiducials from
fsaverage
and ask me to (re)place them; however, with atrans
provided, deriving the MRI fiducials is very easy and is actually what I'd expect to be done automatically. I shouldn't have to pick fiducials again if atrans
has already been generated!cc @GuillaumeFavelier
The text was updated successfully, but these errors were encountered: