Mapping electrodes onto the brain surface

My SEEG electrode coordinates are in the AC/PC coordinates and I have a T1 scan of the subject. I am looking for a way to mark the location of each electrode contact in the individual brain reconstructed by FreeSurfer, warp to fsaverage, and generate maps like this.

I went through the relevant tutorials but remain confused. MNE-BIDS documentation note "MNE-Python [to] support using mni_tal and mri coordinate frames, corresponding to the fsaverage and ACPC BIDS coordinate systems respectively. Shall I assume that my data is in subject MRI space and apply FreeSurfer’s talairach.xfm transform to get positions in the MNI fsaverage space?

To download my dataset, run the following command in terminal: openneuro-py download --dataset=ds003688 --include=sub-01

I can point you to the notes section of DigMontage.add_mni_fiducials and this tutorial but it sounds like maybe you’ve already seen those. @alexrockhill is the expert here and may have better advice.

I looked at the dataset and it’s in ACPC space which means that the T1 in the anat folder should hopefully be aligned to ACPC and the electrode contact locations should be in scannerRAS. So, what you’ll need to do is convert them to Freesurfer surfaceRAS since that is the coordinate frame where the labels in the imaged linked above are in. The function mne_bids.convert_montage_to_mri — MNE-BIDS 0.12.dev0 documentation in 08. Convert iEEG data to BIDS format — MNE-BIDS 0.12.dev0 documentation does that part for you. However, you’ll need a completed recon-all which has not been included with this openneuro dataset so you’ll have to do something like recon-all -subj sub-1 -sd /path/to/subjects/dir -i sub-1/ses-mri3t/anat/sub-1_ses-mri3t_t1w.nii.gz --all but I would double check that the T1 is aligned to ACPC first just to be sure. Once you’ve done that you should be at the same place as the tutorial @drammock linked and hopefully on your way. Hope that helps!

1 Like