Plotting sEEG contacts

Hi, I may have a similar question. I did freesurfer’s recon-all. And I want to plot the SEEG contacts(in MNI space) in lh.pial and lr.pial of this subject.
I don’t know if I understand right. I’m following the tutorial here How MNE uses FreeSurfer’s outputs — MNE 0.24.0 documentation
This is what I did.

import mne
import nibabel as nib
mri_mni_trans = mne.read_talxfm(subject, subjects_dir)
ver, face = nib.freesurfer.read_geometry(lh_pial_path)
ver_mni = apply_trans(mri_mni_trans, ver)

with ver, so I could plot this pial in MNI together with SEEG contacts.
However, the result seems not right. Where did I do wrong?

@BarryLiu97 I’ve moved your message to a new topic. Please always create a new topic for a new question to make conversation easier. Thank you!

cc @alexrockhill

That case is handled exactly in Working with sEEG data — MNE 1.0.dev0 documentation, is there something there that is unclear?

Also your code doesn’t cover how you plotted the contacts and clearly there is a coordinate frame mismatch so that information is needed too.

My contacts are in MNI space, just like the form in the tutorial (x, y, z) in mm. when I use ‘fsaverage’, the figure was right. So I was thinking whether I transform the pial in a wrong way.

If you put your contact locations in a montage and assigned it to a raw object with fiducials, that would transform the contacts into “head” space because that’s how MNE stores coordinates internally. So it’s a bit more complicated and without the full code to reproduce your figure, I really can’t guess what is going wrong.

1 Like

Hi, I would post my code and data here after organizing it.