Skip to content

EEG: register electrodes over a head

Fa-Hsuan Lin edited this page Jun 28, 2020 · 7 revisions

EEG: register electrodes over a head

This script will evoke a figure showing a head, which as created by FreeSurfer using MRI and the watershed algorithm, and a few EEG electrodes. These electrodes will be marked as red dots. You can manually register between the head and EEG electrodes by a GUI after pressing "K" in the brain figure.

The purpose of file_source_fif (created by FreeSurfer and MNE) was for the preparation of constructing the forward model. This source space defines the potential neuronal current locations and orientations. It will be needed if you want to do source modeling later.

We need three boundaries of the head to allow EEG source modeling. They are surfin_osk: the outer skull surface of a head, surfin_isk: the inner skull of a head, and surfin_osc: the outer scalp of a head. These files were created by FreeSurfer and MNE.

Two files file_elec_loc and file_elec_name were created by the Polhemus digitizing system. They told the names and the locations of electrodes (before co-registering to the head).

The output of this script is a data file named fwd_prep_041018.mat, which includes the boundaries defined above, the potential neuronal current source locations, and the location of EEG electrodes on the scalp. This file can be useful for

  1. EEG source modeling
  2. Displaying EEG topology on the scalp.

To manually register between EEG electrodes and a head

Pressing "K" in the figure will evoke a window showing buttons to manually register between the head and the electrodes.

Upon completing the registration, click the "export and save" button (at the lower right corner). Select the file to save the registered electrode locations to the Matlab data file. Here we used the file fwd_prep_041018.mat, the same file storing the boundaries and source locations of this very data set as an example. Registered electrode locations will be also exported as the variable 'points' should in the Matlab environment.

To visualize the source space, co-registered electrodes and boundary sources

You can use this script to visualize the source space, co-registered electrodes, and boundary sources. The source space consists of neuronal current sources at gray/white matter boundary (shown in skin color). Blue dots on the boundary surface indicate the locations of neuronal current sources to be modeled. Three boundary surfaces of inner-skull, outer-skull and outer scalp were shown in semi-transparent. Green dots are locations of electrodes with their name shown next to them.

Clone this wiki locally