-
Notifications
You must be signed in to change notification settings - Fork 83
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
Converting fiducials read via mne.io.read_fiducials() to BIDS anatomical landmarks #968
Comments
can you show me how the code would look like?
… Message ID: ***@***.***>
|
I'm probably missing something but why can't you pass the landmarks directly to |
Because they're not in the correct coordinate system. MNE stores them in |
Yes, in fact, I can try to make a proof-of-concept PR and we can see if it becomes a horrible mess or not ;) |
no PR needed. You can just paste here some "mock up code snippet" to show
how it could be
… Message ID: ***@***.***>
|
One suggestion to look into would be whether it would be easier to apply the trans directly to the landmarks like it is done for montage. |
In my case, I don't have a trans, and I may not even have an Based on the landmarks in |
The trans would be from the T1.mgz which you could just load with You could add a convenience function in |
* Make update_anat_landmarks() accept fiducials file Fixes #968 * Update mne_bids/sidecar_updates.py * Update mne_bids/sidecar_updates.py * We don't need zooming after all 😶🌫️ * Remove subject magic * Deprecate behavior in get_head_mri_trans() * Apply suggestions from code review Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org> * Fix typos in comment * Flake Co-authored-by: Alexandre Gramfort <alexandre.gramfort@m4x.org>
MNE stores fiducials in the
mri
(surface RAS) coordinate system; however, BIDS requires MRI voxel coordinates. @alexrockhill has created the helpful functionget_anat_landmarks()
that generates landmarks in the correct coordinate system based on digitization points in anInfo
and a transformation matrix.However, I now have a file created via the coregistration GUI (which internally calls
mne.io.write_fiducials()
), and there is no easy way to store thesemri
landmarks in my BIDS MRI'sAnatomicalLandmarkCoordinates
field.I suppose we could modify
get_anat_landmarks()
to accept existing fiducials (or a path to a fiducials file), skip the first bits of processing it currently does with theInfo
and transfomation matrix, and convert the fiducials into the correct coordinate system.WDYT?
cc @agramfort
The text was updated successfully, but these errors were encountered: