
An important goal for Electroencephalogram-based functional brain studies is to identify the location of brain sources that produce the scalp-recorded signals. This task requires accurate identification and position of all Electroencephalogram (EEG) electrodes fixed on the scalp. The most widely used method is currently the electromagnetic digitization technique where a clinician uses an electromagnetic stylus to pinpoint the electrodes and record their positions.
However, because the localisation process is error-prone and requires accurate mechanical positioning of the stylus, the measurements are carried many times for each EEG electrode. This is a long and fastidious procedure for both the clinician and the patient.

The work herein describes an automatic method for detecting and labelling new MR-compatible EEG electrodes in the MRI volume. The applied procedure yields a direct measure of the EEG electrodes positions in the fiducial system (nasion, left and right pre-auricular), thereby simplifying the co-registration task of the electrodes positions with the MRI volume.

The software was developed with the purpose of reducing the operator's time and possible human errors in the localisation process. The new EEG sensors are MR compatible, i.e. no susceptibility artefact on the MR images or induced currents that could harm the subject and it is MR localisable. With this new method, only two different examinations (EEG and MRI) are required to identify the locations of brain sources.
Since the surface of the human head is globally convex, one expects the positions of the EEG electrodes on the scalp to form a convex cloud of points, i.e. the EEG electrodes are part of the convex hull defined by the scalp. This observation gives a hint on how the EEG electrodes may be identified in the MRI volume.
First, a median filter is applied to the MRI volume in order to smooth away noisy voxels. Afterwards, an adaptive cubic spline curve is fitted to the histogram of the MRI volume for automatic thresholding of the hypersignals associated with the gadolinium balls (which are fixed on top of the EEG electrodes). Indeed, the histogram of the MRI volume of the head shows a lobe associated with the voxels occupied by the volume of the head and a very high peak on the left for low-level intensities corresponding to the background.
The intensities of the hypersignals related to the gadolinium balls extend along the space on the right of the lobe in the histogram. The threshold is set where the spline fit becomes an almost straight line.
The thresholding at this position of the histogram allows segmenting out all data associated with the subject's head and background. Furthermore, in order to get rid of spurious voxels due to abrupt thresholding, the volume is cleaned up by applying an opening operation with a spherical structuring element which size is smaller than the volume of a gadolinium ball. The MRI signals associated with the gadolinium balls can then be separated.




The second part of the algorithm constructs a Delaunay convex hull using the barycenters of the automatically detected spheres. Since an MR-EEG electrode is fixed on the scalp and is positioned below its associated ball of gadolinium, the 3D coordinates of the convex hull vertices need to be re-adjusted down the outer normals of the hull surface to obtain the right coordinates of the EEG electrodes.
For the labelling stage of the electrodes, the algorithm projects the re-adjusted coordinates of the hull vertices onto an ellipsoid that models the patient's head. It is worth mentioning that the projection is performed for labelling purposes only, i.e. the real coordinates of the electrodes remain unchanged.
After readjustments to align the ellipsoid with the ten–ten international system, the EEG electrodes are automatically identified and labelled. First, the four basal temporal electrodes (FT9, P9, FT10, and P10) are sorted according to their x–y coordinates and then labelled accordingly. Afterwards, the outer ring is labelled, working clockwise and starting from the electrode Fpz. The remaining electrodes are sorted into seven sets of electrodes with respect to their y coordinates. The first and last sets contain only three electrodes each whilst the other sets have seven electrodes each.
Finally, since the coordinates of the MR-EEG electrodes are estimated directly from MRI data, the co-registration of this cloud of points with the MRI volume is straightforward.


