Visualization of EEG/MEG Sensor Data

We are excited to present the newest feature of MNE-CPP: Real-Time capable visualization of EEG/MEG sensor data. During a student project several new key features were implemented, which are described below.

First a method to project sensors to the mesh, which is to be interpolated on, was implemented.  The projection is needed because sensor positions may be somewhat above the vertices of the used mesh. In order to interpolate signals, distances between vertices are of significant interest. Because using Euclidian distances for further calculations is very imprecise, we now provide a method for calculating surface constrained distances (SCD). Since precise calculation of surface constrained distances takes far too much computation time, we decided to approximatively calculate distances by using the edges of the mesh. To further reduce computation time, we introduced a distance threshold: Vertices with a higher distance than a threshold are assumed to be infinitely far away from one another. The actual implementation of the SCD is based on an Iterative Dijkstra. We then computed an interpolation matrix based on inverse distance weighting, where the weights are dependent on an interpolation kernel (linear, quadratic, cubic etc.). The code was integrated into the MNE-CPP library layer.

Furthermore, MNE Scan and Disp3D have been improved by adding sensor level data visualization. The two videos below show the new features in action. First video presents the new visualization on an evoked data set generated from a set of 100 right stimuli. The second video shows a real-time visualization of EEG sensor data during an ongoing measurement with a dry EEG cap setup.