If you have a question or issue with MNE-Python, please include the following info:
MNE version: e.g. 1.4.2
operating system: e.g. Windows-10-10.0.19045-SP0
Hello,
I just started some iEEG preprocessing and so far the MNE-python tutorial on locating electrodes has been very helpful. The results I got with my own data generally look fine when I followed the steps, except for when I opened the GUI with mne_gui.locate_ieeg(raw.info, subj_trans, CT_aligned, ‘p02’,‘p2’), the 3D plot shows a serious misalignment between the freesurfer reconstructed T1 and the CT scan (in the right lower corner), both of which are supposed to be aligned already.
Sorry I missed this before. Sounds like an issue with the coordinate system. It might have been fixed in recent versions though. Could you try with the development version of mne-python and the development version of mne-gui-addons and let me know if there is still a mis-alignment? If so, then I can help look into the coordinate systems. This looks a lot like an issue that was fixed recently and just hasn’t made it to the next release yet.
I looked into it and I was able to replicate the issue for a CT that wasn’t aligned to the MR. That’s very odd when they are aligned, the image spaces should be exactly the same. Ah actually now that I’m writing this, I remembering that freesurfer surface RAS is hardcoded as LIA (left inferior anterior) with the patient head-first supine so if the CT was a different orientation originally, it could cause that sideways brain. This PR I hope should fix the issues although I’m not 100% sure because I don’t have access to the data you are using but it fixes my replication of the issue: [BUG] Fix marching cubes not in the right space when CT is not aligned by alexrockhill · Pull Request #25 · mne-tools/mne-gui-addons · GitHub
Sorry for the delay, I am not familiar with git, I had to call for help to install the bug fix on my computer.
Now I can confirm that yes, the fix solves the issue! Thank you very much!
It’s merged to the development version so now you can just do $ pip install --upgrade git+https://github.com/mne-tools/mne-gui-addons@main for the working version, you don’t have to do all those git commands.