Skip to content

EEG: prepare topography rendering

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

1. Prepare a Matlab data file

Use [this script file] to show a head surface, where electrodes will be manually registered on the scalp. The electrodes are named in the variable "electrode" in the script. This script generates a Matlab mat file toposcalp_prep.mat.

2. Enable the electrode registration GUI

Over the figure, press 'b' to enable the electrode registration GUI.

Click the button "l" to load a variable electrode into the GUI. Now the list box should include all electrodes.

3. Register each electrode

Select one electrode to be registered. In this example, we choose "Cz". Then use the toolbox in the GUI to rotate the head model to a preferred view angle. Click the location of the electrode "Cz". Then click the "x" button in the registration GUI. Now electrode "Cz" is set at the clicked location.

NOTE In case you want to change the location of an already registered electrode, you first select that electrode from the list box. Then click the desired new location for that electrode in the head model. Finally, click the "x" button in the registration GUI. The location of that electrode will move accordingly.

NOTE You can also remove electrodes by first selecting an electrode in the list box and then clicking the "-" button in the registration GUI.

Repeat the same procedure for other electrodes. Then all electrodes should be registered.

4. Export registered electrodes

Click the "save" button in the registration GUI. A file dialog box appears. Choose "toposcalp_prep.mat" and the variable verts_electrode_idx, which was originally empty, will be replaced by all manually registered electrodes.

Clicking the "export" button in the registration GUI will save the variable verts_electrode_idx in the working environment.

5. Display registered electrodes

Run [the same script] again. Suppose that now you have the electrodes registered and exported to the Matlab MAT file toposcalp_prep.mat. Now you should see the locations of those electrodes.

##NOTE##: A standard 10-20 EEG cap definition is defined here: [script, mat]

Clone this wiki locally