Passing `trans` to mne.gui.coregistration() should automatically derive the MRI fiducials
See original GitHub issueCurrently, the following code will estimate the fiducials from fsaverage
and ask me to (re)place them; however, with a trans
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 a trans
has already been generated!
import os.path as op
import mne
from mne.io import read_info
data_path = mne.datasets.sample.data_path()
subjects_dir = op.join(data_path, 'subjects')
subject = 'sample'
fname_raw = op.join(data_path, 'MEG', subject, subject + '_audvis_raw.fif')
fname_trans = op.join(data_path, 'MEG', subject,
f'{subject}_audvis_raw-trans.fif')
mne.gui.coregistration(
subject='sample',
subjects_dir=subjects_dir,
inst=fname_raw,
trans=fname_trans,
)
Issue Analytics
- State:
- Created 2 years ago
- Comments:23 (23 by maintainers)
Top Results From Across the Web
mne.coreg.Coregistration — MNE 1.2.2 documentation
Compute distance between head shape points and MRI skin surface. fit_fiducials ([lpa_weight, nasion_weight, ...]) Find rotation and translation ...
Read more >SPM12 Manual - Wellcome Centre for Human Neuroimaging
MRI images are typically registered to the first image. The more accurate way would be to use a two pass procedure, but this...
Read more >News - Brainstorm - Biomedical Imaging Group
This can help identify and fix manually coregistration issues. ... Brainstorm is now fully interfaced with new programs for MRI processing and segmentation:....
Read more >fMRI-based validation of continuous-wave fNIRS of ... - Nature
Compared to functional magnetic resonance imaging (fMRI), functional near infrared spectroscopy (fNIRS) has several advantages that make it ...
Read more >Implementing source space analysis functionality in a GUI ...
MRI image reconstruction (see section 2.2) can take hours, while some steps in source analysis (when performed by MNE-Python methods) can ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Correct, and YAGNI. The standard location
SUBJECTS_DIR/SUBJECT/bem/SUBJECT-fiducials.fif
should be enough in 99% of cases.When I’ve run
mne coreg
multiple times with-s sample
, it goes into fiducial-editing mode on startup every time. So it either isn’t saving it (to the right place), or it’s not detecting the presence ofsample/bem/sample-fiducials.fif
.FWIW I don’t think it should auto-save – I think there should be a
save
button, thefilename
field should auto-populate with$SUBJECTS_DIR/$SUBJECT/bem/$SUBJECT-fiducials.fif
, and if you click “save” and the file exists, you should get a popup prompt asking if you’re sure you want to overwrite. (This is one case where a file browser could potentially be used, but we really want people to stick with the standard filename so I’d rather not tempt them to use something else by making browsing/selecting something different easier.)