4320
Comment:
|
23392
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= EEG and epilepsy = This tutorial introduces some concepts that are specific to the management of EEG recordings in the Brainstorm environment. It also describes a standard pipeline for analyzing epilepsy recordings. It is based on clinical case from the Epilepsy Centre, at the University Hospital Freiburg, Germany. The EEG data was recorded at 1024Hz, using a Neurofile NT digital video-EEG system with 128 channels. The anonymized dataset can be downloaded directly from the Brainstorm download page. The case from this tutorial is also published in this article: Dümpelmann M, Ball T, Schulze-Bonhage A<<BR>>[[http://www.ncbi.nlm.nih.gov/pubmed/21618659|LORETA allows reliable distributed source reconstruction based on subdural strip and grid recordings]], Hum Brain Mapp. 2012 |
= EEG and Epilepsy = ''Authors: Francois Tadel, Elizabeth Bock, Marcel Heers & John Mosher.'' This tutorial introduces some concepts that are specific to the management of EEG recordings in the Brainstorm environment. It also describes a standard pipeline for analyzing epilepsy recordings. It is based on a clinical case from the Epilepsy Center at the University Hospital of Freiburg, Germany. The anonymized dataset can be downloaded directly from the Brainstorm download page. |
Line 7: | Line 7: |
This tutorial dataset (EEG and MRI data) remains proprietary of the Epilepsy Centre, University Hospital Freiburg, Germany. Its use and transfer outside the Brainstorm tutorial, e.g. for research purposes, is prohibited without written consent from the Epilepsy Centre in Freiburg. For questions please contact A. Schulze-Bonhage, MD, PhD: andreas.schulze-bonhage@uniklinik-freiburg.de | This tutorial dataset (EEG and MRI data) remains proprietary of the Epilepsy Centre, University Hospital Freiburg, Germany. Its use and transfer outside the Brainstorm tutorial, e.g. for research purposes, is prohibited without written consent from the Epilepsy Center in Freiburg. For questions please contact A. Schulze-Bonhage, MD, PhD: andreas.schulze-bonhage@uniklinik-freiburg.de |
Line 10: | Line 10: |
The EEG data was recorded at 1024Hz, using a Neurofile NT digital video-EEG system with 128 channels and a 16-bit A/D converter. The signal was filtered in the recording system with a high-pass filter with a time constant of 1 second and a low-pass filter with a cutoff frequency of 344 Hz. The spikes were visually identified and averaged with the ASA package. The spike average showed prominent peaks in the grid contacts G_A2-4, G_B2-5, G_C1-3. Type of epilepsy, supposed location, clinical conclusions, etc. |
This tutorial dataset was acquired in a patient who suffered from focal epilepsy with focal sensory, dyscognitive and secondarily generalized seizures since the age of eight years. He does not have any typical risk factors for epilepsy. The high resolution 3T epilepsy MRI including postprocessing was found to be normal. FDG-PET of the brain did not show any pathological changes in the glucose metabolism. Non-invasive telemetry revealed left fronto-central sharp waves, polyspikes and bursts of beta band activity (max. amplitude FC1, Cz) especially during sleep. The tutorial dataset was acquired during one night of the non-invasive telemetry recording at the Epilepsy Center Freiburg, Germany. Afterwards the patient underwent invasive EEG to identify the epileptogenic area and to map functionally important cortex. Details about invasive EEG and source localization from invasive EEG in this patient are reported in Dümpelmann, et al. (2011). Subsequently a left frontal tailored resection was performed. The histological analysis revealed a focal cortical dysplasia type IIB according to the classification of Palmini, et al. (2004). The postsurgical outcome is Engel 1A with a follow-up of 5 years. The EEG data distributed here was recorded at 1024Hz, using a Neurofile NT digital video-EEG system with 128 channels and a 16-bit A/D converter. The signal was filtered in the recording system with a high-pass filter with a time constant of 1 second and a low-pass filter with a cutoff frequency of 344 Hz. The spikes were marked in the Deltamed Coherence Viewer. == Overview of the data processing == The proper identification of epileptiform discharges ("spikes") is a complicated topic beyond the scope of this tutorial. Neurology students train intensively on how to identify true interictal and ictal discharges, particularly as distinct from so-called "normal variants" that can be abundant. Sleep and drowsy states of the brain can generate "vertex waves," "K-complexes," "positive occipital sharp transients of sleep" (POSTS), and "wickets," to name a few variants, none of which are epileptic. A good overview of terminology and application can be found, for example, on the Medscape website, [[http://emedicine.medscape.com/article/1138880-overview|Epileptiform Discharges.]] With this caveat, we nonetheless give an overview of the processing approach. Although automation has been proposed for decades, "spike hunting" is often done by manual inspection of the recorded EEG waveforms (whether scalp, subdural, or depths). The classic scalp sensor arrangement is the International 10-20 System ([[http://en.wikipedia.org/wiki/10-20_system_(EEG)|Wikipedia Site]], [[http://www.bem.fi/book/index.htm|Bioelectromagnetism Book]], [[http://www.bem.fi/book/13/13.htm#03|Chapter 13.3]]) arranged at 10 percent and 20 percent distances about the circumference of the head. Each of these 21 electrodes is acquired with respect to some reference (as all potentials must be). In reviewing the recordings, however, several "montages" are traditionally recommended that digitally "re-reference" the original recordings into new linear combinations of electrodes. A classic montage is the "double banana" ([[http://www.google.com/search?q=eeg+double+banana|Google Search]]) which emphasizes local changes in the scalp EEG by forming sequential bipolar pairs, such as "Fp1-F3", "F3-C3." Because F3 is found twice in this montage and of opposite sign, then an epileptic spike centered under F3 will appear as a reversed polarity in these two channels, a visual cue the trained epileptologist seeks when rapidly scanning through hours of recordings. This montage is more formally known as "LB-18.3" or "Longitudinal Bipolar 3" in the nomenclature of the American Clinical Neurophysiology Society Guidelines (see References Below). ACNS guidelines suggest using both "longitudinal" and "transversal" bipolar montages to survey your data. For temporal epilepsy cases, you may also add a "temporal ring" montage. European neurologists often prefer to review the recordings using an average reference montage. Brainstorm provides several variations of all these montages, allows the users full flexibility in creating their own and different montages can run simultaneously in multiple windows. The user has to step along through the data, look for abnormal brain activity, then use Brainstorm's event markers to tag suspect intervals.With the suspected events marked and saved, the user can return later to perform source analyses on these intervals. With this brief overview, we detail below an exercise with the sample epilepsy data. === References === Dümpelmann M, Ball T, Schulze-Bonhage A (2011)<<BR>> [[http://www.ncbi.nlm.nih.gov/pubmed/21618659|sLORETA allows reliable distributed source reconstruction based on subdural strip and grid recordings]]. Human Brain Mapping. Palmini A, Najm I, Avanzini G, Babb T, Guerrini R, Foldvary-Schaefer N, Jackson G, Luders HO, Prayson R, Spreafico R, Vinters HV (2004) [[http://www.ncbi.nlm.nih.gov/pubmed/15037671|Terminology and classification of the cortical dysplasias]].<<BR>> Neurology, 62:S2-8. Standard montages recommended by the American Clinical Neurophysiology Society: * [[https://www.acns.org/practice/guidelines|American Clinical Neurophysiology Society Guidelines]] * [[https://www.acns.org/pdf/guidelines/Guideline-5.pdf|Guidelines for Standard Electrode Position Nomenclature #5]] * [[https://www.acns.org/pdf/guidelines/Guideline-6.pdf|A Proposal for Standard Montages to Be Used in Clinical EEG #6]] |
Line 16: | Line 40: |
* Go to the [[http://neuroimage.usc.edu/brainstorm3_register/download.php|Download]] page of this website, and dowload the file: '''sample_epilepsy.zip ''' | * Go to the [[http://neuroimage.usc.edu/brainstorm3_register/download.php|Download]] page of this website, and download the file: '''sample_epilepsy.zip''' |
Line 24: | Line 48: |
* Create one subject. * Right-click on the subject node > Import anatomy folder > sample_epilepsy/Anatomy (format=BrainVISA) * For now the MRI is processed with BrainVISA, but we would like to have it fully processed with !FreeSurfer. * If no anatomy available: [[Tutorials/TutWarping|Warping tutorial]] |
* Right-click on the !TutorialEpilepsy folder > New subject > '''sepi01''' * Leave the default options you set for the protocol * Right-click on the subject node > Import anatomy folder: * Set the file format: "!FreeSurfer folder" * Select the folder: '''sample_epilepsy/anatomy''' * Number of vertices of the cortex surface: 15000 (default value) * Set the 6 required fiducial points (indicated in MRI coordinates): * NAS: x=135, y=222, z=75 * LPA: x=57, y=118, z=68 * RPA: x=204, y=119, z=76 * AC: x=131, y=145, z=110 * PC: x=130, y=119, z=111 * IH: x=128, y=134, z=170 (anywhere on the midsagittal plane) * At the end of the process, make sur the file "cortex_15000V" is selected (downsampled pial surface, that will use for the source estimation). If it is not, double-click on it to select it as the default cortex surface.<<BR>> {{attachment:anatomy.gif||height="257",width="442"}} ==== Without the individual MRI ==== If you do not have access to an individual MR scan of the subject (or if its quality is too low to be processed with !FreeSurfer), but if you have digitized the head shape of the subject using a tracking system, you have an alternative: deform one of the Brainstorm templates (Colin27 or ICBM152) to match the shape of the subject's head.<<BR>>For more information, read the following tutorial: [[Tutorials/TutWarping|Warping default anatomy]] |
Line 30: | Line 67: |
==== Link the recordings ==== | |
Line 31: | Line 69: |
* Right-click on the subject folder > Review raw file > sample_epilepsy/Data/tutorial_EEG.bin (format = "EEG: Deltamet Neurofile-Coherence (*.bin)") * Right-click on the subject folder > Import channel file > sample_epilepsy/Data/XensorTest.elc (format = "EEG: ANT Xensor (*.elc)")<<BR>=> Contains the default electrodes positions from the ASA software (ANT). * Change the sensor type of the following electrodes to '''MISC''': SP1, SP2, RS, PHO, DELR, DELL, QR, QL * Run the automatic alignment manually. == Mark and review spikes == * How was it done initially? * How would we do it in Brainstorm? * Import 177 spikes: * '''[-1, +1] seconds''' around the spike events (???) * Remove DC offset based on the whole trial (-1s to +1s) (???) |
* Right-click on the subject folder > Review raw file: * Select the file format: "EEG: Deltamed Neurofile-Coherence (*.bin)" * Select the file: '''sample_epilepsy/data/tutorial_EEG.bin''' * The new file "Link to raw file" lets you access directly the contents of the EEG recordings * The channel file "Deltamed channels" in the (Common files) folder contains the name of the channels, but not their positions. We need to overwrite this file and import manually the positions of the electrodes (either a standard cap or accurate positions digitized with a Polhemus device). ==== Prepare the channel file ==== * Right-click on the subject folder > Import channel file: * Select the file format: "EEG: ANT Xensor (*.elc)" * Select the file: '''sample_epilepsy/data/tutorial.elc''' * Confirm that you want to overwrite the exising channel file. * This file contains the default electrodes positions from the ASA software (ANT) * The recordings contain signals coming from different types of electrodes: * 29 EEG electrodes * EOG1, EOG2: Electrooculograms * EMG, ECG: Electromyogram and electrocardiogram * SP1, SP2: Sphenoidal electrodes * RS: Electrode on the right shoulder * PHO: Photo stimulation channel * DELR, DELL, QR, QL: Additional * The file format for the electrodes positions does not describe the type of the channels correctly, therefore all the signals saved in the files are classified as EEG. We need to redefine this manually to get correct groups of sensors, we want to have only real EEG electrodes in the "EEG" category and put everything that we are not going to use a "MISC" category. * Right-click on the channel file > Edit channel file: * Note that the EOG, EMG and ECG channels already have a different type * Select all the other non-EEG channels: SP1, SP2, RS, PHO, DELR, DELL, QR, QL * Right-click in the window > Set channel type: type '''MISC''' * Close the figure and accept to save the modifications {{attachment:channel_type.gif}} ==== Register electrodes with MRI ==== * The channel file we imported contains generic electrodes positions, hence it cannot be properly aligned properly with the head surface coming from the MRI. We need to register manually these electrodes positions with the subject anatomy. * Right-click on the channel file > MRI registration > Edit... * The default positions are already quite good, and the head shape is correct, there not much manual registration to do. You can click on the Label button in the toolbar to show the electrodes names. * Click on the button "Refine registration with the head points" to find a better registration between the head shape defined by the electrodes and the head surface coming from the MRI. To get the legend of a button, leave your mouse for a few seconds over it. * Click on the button "Project electrodes on the scalp surfaces", to ensure all the electrodes touch the skin surface. * Click on "OK" to save the modifications.<<BR>><<BR>> {{attachment:channel_align.gif|channel_type.gif}} == Review EEG recordings == ==== Display the recordings in one montage ==== * For basic information on how to manipulate the montages in Brainstorm: [[http://%20neuroimage.usc.edu/brainstorm/Tutorials/TutExploreRecodings#Montages|read this tutorial]]. * Open a time series figure with the "'''Average reference'''" montage * Right-click on the "Link to raw file" > EEG > Display time series. * In the Record tab, select the first button in the toolbar (Display mode for time series) to view the signals in columns. * Select the "Average reference" in the drop-down list. This menu allows you to set a predefined montages to linearly re-arranging the waveforms. Note the keyboard shortcuts in the menus. * In the Record tab, change the default duration that is reviewed to '''10s'''. * Open a '''2D Sensor cap''' map of the EEG sensor values as well: * Right-click on "Link to raw file" again > EEG > '''2D Sensor cap ''' * In the Record tab, set the Montage to this view to "'''Average reference'''" * Open the '''ECG '''and '''EOG '''traces as well, to avoid confusing spikes with cardiac or ocular artifacts:<<BR>> * Right-click on the Link to raw file > ECG > Display time series * Right-click on the Link to raw file > EOG > Display time series * The ECG is almost mandatory. The EOG is optional: it can be helpful for beginners but an experienced reviewer will easily recognize the eye movements directly in the EEG data. * Re-arrange the figures in a convenient way, for example as illustrated below, and disable the automatic positioning of the figures you the figure arrangement doesn't get lost when you open a new figure (Window layout menu at the top-right of the Brainstorm figure > None) * Having a lot of windows open may slow down significantly the display because each time you change the current time, all the figures have to be updated. A lot of space is also wasted on the screen due to window frames. The number of windows to open has to be a balance between the amount of information to display and the ease of use. {{attachment:reviewall.gif}} ==== Frequency filters ==== Go to the Filter tab to enable some display frequency filters. General recommendations are: * High-pass filter: '''0.5 Hz''' * Low-pass filter: '''70 Hz'''<<BR>><<BR>> {{attachment:filters.gif}} ==== Time and amplitude resolution ==== The resolutions of the time and amplitude axes has a lot of importance for the visual detection of epileptic spikes. The shapes we are looking for are altered by the horizontal and vertical scaling. The distance unit on a screen is the pixel, we can set how much time is represented by one pixel horizontally and how much amplitude is represented by one pixel vertically. In the Brainstorm interface, this resolution is usually set implicitly: you can set the size of the window, the duration or recordings reviewed at once (text box "duration" in tab Record) and the maximum amplitude to show in the figure (buttons [...] and [AS] on the right of the time series figure). From there, you can also zoom in time ([<], [>], mouse wheel) or amplitude (['''^'''], [v], Shift+mouse wheel). Those parameters are convenient to explore the recordings interactively but don't allow us to have reproducible displays with constant time and amplitude resolutions. To set the figure resolutions: right-click on the figure > Figure > Set axes resolution. Note that this interface does not store the input values, it just modifies the other parameters (figure size, time window, max amplitude) to fit the resolution objectives. Then if you modify those parameters (resize the figure, leave the button [AS] selected and scroll in time...) the resolution is lost, you have to set it again manually. Recommendations for this dataset are: * Time axis: 90 pixels/sec (~30 mm/sec) * Amplitude: 4 μV/pixels (~12 μV/mm) => 3. CHECK THE VALUES ??? => 4. SCREEN CAPTURE ??? ==== User setups ==== This preparation of the reviewing environment requires a large number of operations, and would become quickly annoying if you have to repeat it everytime you open a file. This is a good time to use the menu "User setups" to save this window configuration, to reload it in one click later. In the menu "Window layout", at the top-right of the Brainstorm window, select User setup > New setup. Enter a name of your choice for this particular window arrangement. This operation will also automatically disable the automatic window arrangement (Window layout > None). To reload it later, open one figure on the dataset you want to review and then select your new entry in the User setup menu. . {{attachment:usersetup.gif}} ==== Multiple montages ==== * Open another view on the same data with the "'''Longitudinal 3'''" montage ("double-banana" LB-18.3) * Right-click on the "Link to raw file" again > EEG > Display time series * Alternatively, you can right-click on the existing figure > Figure > Clone figure. * Set the montage for this new figure to "Longitudinal 3" * If you don't see the "Longitudinal 3" menu, it is because you ran Brainstorm for the first time before those predefined montages were made available in Brainstorm. To add them manually: * In the Record tab, select "Edit montages" in the drop-down menu * Click on the "Load montage" button * Go to the folder "brainstorm3/toolbox/sensors/private/", and select the first file * Note that a new entry (probably "Longitudinal 1") is added to the list of available montages * Repeat the operation with all the files in the folder "brainstorm3/toolbox/sensors/private/" * Click on "Save" to close the montage editor and now select "Longitudinal 3" == Mark spikes == In the dataset, the spikes have already been identified by experts at the University Hospital of Freiburg. You can see that 177 SPIKE events are available in the Record tab. Click on a few of them a try to identify the shape of the spike. => 5. SCREEN CAPTURE ??? The procedure if you are marking the events by yourself is the following: * Open a continuous file viewer, the load your reviewing environment (menu User setups) * Start by creating a group of events (in the Record tab: Events > Add group), and select it in the list of events. * Make sure that the time and amplitude resolutions are what you are used to<<BR>>(right-click on the figure > Figure > Set axes resolution) * Scroll through the recordings using the [<<<] and [>>>] buttons or shortcuts such as F3 or F4 (complete list and descriptions available when you leave your mouse over those buttons). * You can adjust the gain of the electrodes to observe better an event with the buttons ['''^'''] and [v] or the shortcut [Shift+mouse wheel]. * When you identify a spike, click in a white area of the figure in order to place the time cursor at the peak of the spike. If you click on the signal itself, it selects the corresponding channel, but you can use the shortcut Shift+Click to prevent this behavior and force the time cursor to be moved instead. * Press Ctrl+E to add a marker where the time cursor is. * If you are marking multiple types of events, it is convenient to set up some additional keyboard shortcuts. Using the menu '''Events > Edit keyboard shortcuts''', you can associate custom events to the key 1 to 9 of the keyboard. Define the name of the event type to create for each key, and then simply press the corresponding key to add/delete a marker at the current time position. * More information on the data viewer, see tutorial: [[Tutorials/TutRawViewer|Review continuous recordings]]. => 6. CONFIRM THE PROCEDURE ??? == Pre-process recordings == * High-pass filter the recording at 0.5Hz => 7. APPLY 0.5 Hz FILTER TO THE CONTINUOUS RECORDINGS BEFORE IMPORTING ??? => (NOT POSSIBLE WITH THIS FILE FORMAT AND EPOCHS TOO SHORT TO FILTER AFTER) => REMOVE DC OFFSET INSTEAD? WITH LONGER EPOCHS BEFORE ZERO ? == Epoching and averaging == ==== Import recordings ==== * Right-click on the "Link to raw file" > Import in database * Select the option "Use events" and select the category '''SPIKE''', with 177 events. * Epoch time: '''[-100, +300]ms''' around the spike events * Uncheck "Remove DC offset": the DC offset has already been removed with the high-pass filter<<BR>><<BR>> {{attachment:import.gif}} * You should see a new folder "SPIKE" containing 177 epochs in your database.<<BR>><<BR>> {{attachment:import_after.gif}} ==== Average spike ==== * Drag and drop all the SPIKE files or the SPIKE folder into the Process1 tab * Run the process "Average > Average files", with the following options:<<BR>><<BR>> {{attachment:average1.gif}} * Double click on the new file "Avg: SPIKE" to review it * Open a "2D sensor cap" view on the same file, or simply press [Ctrl+T] from the time series figure.<<BR>><<BR>> => SCREEN CAPTURE ??? * To have all the figures re-arrange themselves automatically again, select "Weighted" or "Tiled" in the "Window layout" menu (top-right corner). * Explore this average in time with the left and right keyboard arrow. * To get a synthetic view at the sensor level of the evolution of the 2D map in time, right-click on the figure > Snapshot > "Time contact sheet: Figure" => SCREEN CAPTURES ??? |
Line 44: | Line 219: |
* Compute head model: OpenMEEG or 3-shell sphere (???) * Noise covariance matrix: '''[-1000, -800] ms''' from all the imported trials (???) * Source model: (???) |
==== Head model ==== * Right-click on the channel file (or any folder containing the channel file) > Compute head model<<BR>><<BR>> {{attachment:headmodel1.gif}} * Select the "cortex surface option" and the "OpenMEEG BEM" forward model<<BR>><<BR>> {{attachment:headmodel2.gif}} * Leave all the OpenMEEG options to their defaults, which should be:<<BR>><<BR>> {{attachment:headmodel3.gif}} ==== Noise covariance matrix ==== * For minimum norm inverse models, we need to estimate first the level of noise at the level of the sensors. Defining what can be considered as "noise" in the middle of continuous brain recordings is a difficult question, discussed in the [[Tutorials/TutNoiseCov|Noise covariance tutorial]]. * Here we chose what is described as option 1b in the section "Noise and epilepsy" in that tutorial: we are going to calculate the noise covariance matrix using 10 seconds from the raw file that are very "quiet", ie. that contain no apparent epileptic activity, no REM and no other special artifacts. We can use for this purpose the 10s segment between 120s and 130s. * Right-click on the "Link to raw file" > Noise covariance > Compute from recordings<<BR>><<BR>> {{attachment:noisecov1.gif}} * Select the time window [120s - 130s] and leave the other options to the default values<<BR>><<BR>> {{attachment:noisecov2.gif}} ==== Inverse model ==== * Right-click on the head model > Compute sources. * Leave all the default options to calculate a wMNE solution with constrained dipole orientation<<BR>><<BR>> {{attachment:inverse1.gif}} * Compute z-score => 9. WHAT ARE THE INTERESTING DISPLAYS ??? => MOVIES ? CONTACT SHEETS ? WHAT ANGLES ? ==== Discussion ==== Discuss advantage of distributed source models in the evaluation of epilepsy data compared with ECD (Kobayashi K, Epilepsia 2005) => 10. DEVELOPMENT ??? |
Line 51: | Line 248: |
== Tools to be developed for this tutorial == * Set the time resolution of the display figures in seconds per centimeter (s/cm): the length of the page changes automatically with the size of the window. * Flip +/- the Y axis (already done: check the brainstorm toolbar) * Refine a bit the display of the dipoles * Flexible montage interface (is this useful here ???) |
=> 11. DOES THIS WORK ??? . {{attachment:SL_MNE_tutorial_patient.jpg||height="403",width="645"}} |
EEG and Epilepsy
Authors: Francois Tadel, Elizabeth Bock, Marcel Heers & John Mosher.
This tutorial introduces some concepts that are specific to the management of EEG recordings in the Brainstorm environment. It also describes a standard pipeline for analyzing epilepsy recordings. It is based on a clinical case from the Epilepsy Center at the University Hospital of Freiburg, Germany. The anonymized dataset can be downloaded directly from the Brainstorm download page.
License
This tutorial dataset (EEG and MRI data) remains proprietary of the Epilepsy Centre, University Hospital Freiburg, Germany. Its use and transfer outside the Brainstorm tutorial, e.g. for research purposes, is prohibited without written consent from the Epilepsy Center in Freiburg. For questions please contact A. Schulze-Bonhage, MD, PhD: andreas.schulze-bonhage@uniklinik-freiburg.de
Presentation of the clinical case
This tutorial dataset was acquired in a patient who suffered from focal epilepsy with focal sensory, dyscognitive and secondarily generalized seizures since the age of eight years. He does not have any typical risk factors for epilepsy. The high resolution 3T epilepsy MRI including postprocessing was found to be normal. FDG-PET of the brain did not show any pathological changes in the glucose metabolism. Non-invasive telemetry revealed left fronto-central sharp waves, polyspikes and bursts of beta band activity (max. amplitude FC1, Cz) especially during sleep. The tutorial dataset was acquired during one night of the non-invasive telemetry recording at the Epilepsy Center Freiburg, Germany.
Afterwards the patient underwent invasive EEG to identify the epileptogenic area and to map functionally important cortex. Details about invasive EEG and source localization from invasive EEG in this patient are reported in Dümpelmann, et al. (2011). Subsequently a left frontal tailored resection was performed. The histological analysis revealed a focal cortical dysplasia type IIB according to the classification of Palmini, et al. (2004). The postsurgical outcome is Engel 1A with a follow-up of 5 years.
The EEG data distributed here was recorded at 1024Hz, using a Neurofile NT digital video-EEG system with 128 channels and a 16-bit A/D converter. The signal was filtered in the recording system with a high-pass filter with a time constant of 1 second and a low-pass filter with a cutoff frequency of 344 Hz. The spikes were marked in the Deltamed Coherence Viewer.
Overview of the data processing
The proper identification of epileptiform discharges ("spikes") is a complicated topic beyond the scope of this tutorial. Neurology students train intensively on how to identify true interictal and ictal discharges, particularly as distinct from so-called "normal variants" that can be abundant. Sleep and drowsy states of the brain can generate "vertex waves," "K-complexes," "positive occipital sharp transients of sleep" (POSTS), and "wickets," to name a few variants, none of which are epileptic. A good overview of terminology and application can be found, for example, on the Medscape website, Epileptiform Discharges.
With this caveat, we nonetheless give an overview of the processing approach. Although automation has been proposed for decades, "spike hunting" is often done by manual inspection of the recorded EEG waveforms (whether scalp, subdural, or depths). The classic scalp sensor arrangement is the International 10-20 System (Wikipedia Site, Bioelectromagnetism Book, Chapter 13.3) arranged at 10 percent and 20 percent distances about the circumference of the head. Each of these 21 electrodes is acquired with respect to some reference (as all potentials must be). In reviewing the recordings, however, several "montages" are traditionally recommended that digitally "re-reference" the original recordings into new linear combinations of electrodes.
A classic montage is the "double banana" (Google Search) which emphasizes local changes in the scalp EEG by forming sequential bipolar pairs, such as "Fp1-F3", "F3-C3." Because F3 is found twice in this montage and of opposite sign, then an epileptic spike centered under F3 will appear as a reversed polarity in these two channels, a visual cue the trained epileptologist seeks when rapidly scanning through hours of recordings. This montage is more formally known as "LB-18.3" or "Longitudinal Bipolar 3" in the nomenclature of the American Clinical Neurophysiology Society Guidelines (see References Below).
ACNS guidelines suggest using both "longitudinal" and "transversal" bipolar montages to survey your data. For temporal epilepsy cases, you may also add a "temporal ring" montage. European neurologists often prefer to review the recordings using an average reference montage. Brainstorm provides several variations of all these montages, allows the users full flexibility in creating their own and different montages can run simultaneously in multiple windows.
The user has to step along through the data, look for abnormal brain activity, then use Brainstorm's event markers to tag suspect intervals.With the suspected events marked and saved, the user can return later to perform source analyses on these intervals. With this brief overview, we detail below an exercise with the sample epilepsy data.
References
Dümpelmann M, Ball T, Schulze-Bonhage A (2011)
sLORETA allows reliable distributed source reconstruction based on subdural strip and grid recordings. Human Brain Mapping.
Palmini A, Najm I, Avanzini G, Babb T, Guerrini R, Foldvary-Schaefer N, Jackson G, Luders HO, Prayson R, Spreafico R, Vinters HV (2004) Terminology and classification of the cortical dysplasias.
Neurology, 62:S2-8.
Standard montages recommended by the American Clinical Neurophysiology Society:
Download and installation
- Requirements: You have already followed all the introduction tutorials and you have a working copy of Brainstorm installed on your computer.
Go to the Download page of this website, and download the file: sample_epilepsy.zip
Unzip it in a folder that is not in any of the Brainstorm folders (program folder or database folder)
- Start Brainstorm (Matlab scripts or stand-alone version)
Select the menu File > Create new protocol. Name it "TutorialEpilepsy" and select the options:
"No, use individual anatomy",
"Yes, use one channel file per subject".
Import the anatomy
Right-click on the TutorialEpilepsy folder > New subject > sepi01
- Leave the default options you set for the protocol
Right-click on the subject node > Import anatomy folder:
Set the file format: "FreeSurfer folder"
Select the folder: sample_epilepsy/anatomy
- Number of vertices of the cortex surface: 15000 (default value)
- Set the 6 required fiducial points (indicated in MRI coordinates):
- NAS: x=135, y=222, z=75
- LPA: x=57, y=118, z=68
- RPA: x=204, y=119, z=76
- AC: x=131, y=145, z=110
- PC: x=130, y=119, z=111
- IH: x=128, y=134, z=170 (anywhere on the midsagittal plane)
At the end of the process, make sur the file "cortex_15000V" is selected (downsampled pial surface, that will use for the source estimation). If it is not, double-click on it to select it as the default cortex surface.
Without the individual MRI
If you do not have access to an individual MR scan of the subject (or if its quality is too low to be processed with FreeSurfer), but if you have digitized the head shape of the subject using a tracking system, you have an alternative: deform one of the Brainstorm templates (Colin27 or ICBM152) to match the shape of the subject's head.
For more information, read the following tutorial: Warping default anatomy
Access the recordings
Link the recordings
- Switch to the "functional data" view.
Right-click on the subject folder > Review raw file:
- Select the file format: "EEG: Deltamed Neurofile-Coherence (*.bin)"
Select the file: sample_epilepsy/data/tutorial_EEG.bin
- The new file "Link to raw file" lets you access directly the contents of the EEG recordings
- The channel file "Deltamed channels" in the (Common files) folder contains the name of the channels, but not their positions. We need to overwrite this file and import manually the positions of the electrodes (either a standard cap or accurate positions digitized with a Polhemus device).
Prepare the channel file
Right-click on the subject folder > Import channel file:
- Select the file format: "EEG: ANT Xensor (*.elc)"
Select the file: sample_epilepsy/data/tutorial.elc
- Confirm that you want to overwrite the exising channel file.
- This file contains the default electrodes positions from the ASA software (ANT)
- The recordings contain signals coming from different types of electrodes:
- 29 EEG electrodes
- EOG1, EOG2: Electrooculograms
- EMG, ECG: Electromyogram and electrocardiogram
- SP1, SP2: Sphenoidal electrodes
- RS: Electrode on the right shoulder
- PHO: Photo stimulation channel
- DELR, DELL, QR, QL: Additional
- The file format for the electrodes positions does not describe the type of the channels correctly, therefore all the signals saved in the files are classified as EEG. We need to redefine this manually to get correct groups of sensors, we want to have only real EEG electrodes in the "EEG" category and put everything that we are not going to use a "MISC" category.
Right-click on the channel file > Edit channel file:
- Note that the EOG, EMG and ECG channels already have a different type
- Select all the other non-EEG channels: SP1, SP2, RS, PHO, DELR, DELL, QR, QL
Right-click in the window > Set channel type: type MISC
- Close the figure and accept to save the modifications
Register electrodes with MRI
- The channel file we imported contains generic electrodes positions, hence it cannot be properly aligned properly with the head surface coming from the MRI. We need to register manually these electrodes positions with the subject anatomy.
Right-click on the channel file > MRI registration > Edit...
- The default positions are already quite good, and the head shape is correct, there not much manual registration to do. You can click on the Label button in the toolbar to show the electrodes names.
- Click on the button "Refine registration with the head points" to find a better registration between the head shape defined by the electrodes and the head surface coming from the MRI. To get the legend of a button, leave your mouse for a few seconds over it.
- Click on the button "Project electrodes on the scalp surfaces", to ensure all the electrodes touch the skin surface.
Click on "OK" to save the modifications.
Review EEG recordings
Display the recordings in one montage
For basic information on how to manipulate the montages in Brainstorm: read this tutorial.
Open a time series figure with the "Average reference" montage
Right-click on the "Link to raw file" > EEG > Display time series.
- In the Record tab, select the first button in the toolbar (Display mode for time series) to view the signals in columns.
- Select the "Average reference" in the drop-down list. This menu allows you to set a predefined montages to linearly re-arranging the waveforms. Note the keyboard shortcuts in the menus.
In the Record tab, change the default duration that is reviewed to 10s.
Open a 2D Sensor cap map of the EEG sensor values as well:
Right-click on "Link to raw file" again > EEG > 2D Sensor cap
In the Record tab, set the Montage to this view to "Average reference"
Open the ECG and EOG traces as well, to avoid confusing spikes with cardiac or ocular artifacts:
Right-click on the Link to raw file > ECG > Display time series
Right-click on the Link to raw file > EOG > Display time series
- The ECG is almost mandatory. The EOG is optional: it can be helpful for beginners but an experienced reviewer will easily recognize the eye movements directly in the EEG data.
Re-arrange the figures in a convenient way, for example as illustrated below, and disable the automatic positioning of the figures you the figure arrangement doesn't get lost when you open a new figure (Window layout menu at the top-right of the Brainstorm figure > None)
- Having a lot of windows open may slow down significantly the display because each time you change the current time, all the figures have to be updated. A lot of space is also wasted on the screen due to window frames. The number of windows to open has to be a balance between the amount of information to display and the ease of use.
Frequency filters
Go to the Filter tab to enable some display frequency filters. General recommendations are:
High-pass filter: 0.5 Hz
Low-pass filter: 70 Hz
Time and amplitude resolution
The resolutions of the time and amplitude axes has a lot of importance for the visual detection of epileptic spikes. The shapes we are looking for are altered by the horizontal and vertical scaling. The distance unit on a screen is the pixel, we can set how much time is represented by one pixel horizontally and how much amplitude is represented by one pixel vertically.
In the Brainstorm interface, this resolution is usually set implicitly: you can set the size of the window, the duration or recordings reviewed at once (text box "duration" in tab Record) and the maximum amplitude to show in the figure (buttons [...] and [AS] on the right of the time series figure). From there, you can also zoom in time ([<], [>], mouse wheel) or amplitude ([^], [v], Shift+mouse wheel). Those parameters are convenient to explore the recordings interactively but don't allow us to have reproducible displays with constant time and amplitude resolutions.
To set the figure resolutions: right-click on the figure > Figure > Set axes resolution. Note that this interface does not store the input values, it just modifies the other parameters (figure size, time window, max amplitude) to fit the resolution objectives. Then if you modify those parameters (resize the figure, leave the button [AS] selected and scroll in time...) the resolution is lost, you have to set it again manually.
Recommendations for this dataset are:
- Time axis: 90 pixels/sec (~30 mm/sec)
- Amplitude: 4 μV/pixels (~12 μV/mm)
=> 3. CHECK THE VALUES ???
=> 4. SCREEN CAPTURE ???
User setups
This preparation of the reviewing environment requires a large number of operations, and would become quickly annoying if you have to repeat it everytime you open a file. This is a good time to use the menu "User setups" to save this window configuration, to reload it in one click later. In the menu "Window layout", at the top-right of the Brainstorm window, select User setup > New setup. Enter a name of your choice for this particular window arrangement.
This operation will also automatically disable the automatic window arrangement (Window layout > None). To reload it later, open one figure on the dataset you want to review and then select your new entry in the User setup menu.
Multiple montages
Open another view on the same data with the "Longitudinal 3" montage ("double-banana" LB-18.3)
Right-click on the "Link to raw file" again > EEG > Display time series
Alternatively, you can right-click on the existing figure > Figure > Clone figure.
- Set the montage for this new figure to "Longitudinal 3"
- If you don't see the "Longitudinal 3" menu, it is because you ran Brainstorm for the first time before those predefined montages were made available in Brainstorm. To add them manually:
- In the Record tab, select "Edit montages" in the drop-down menu
- Click on the "Load montage" button
- Go to the folder "brainstorm3/toolbox/sensors/private/", and select the first file
- Note that a new entry (probably "Longitudinal 1") is added to the list of available montages
- Repeat the operation with all the files in the folder "brainstorm3/toolbox/sensors/private/"
- Click on "Save" to close the montage editor and now select "Longitudinal 3"
Mark spikes
In the dataset, the spikes have already been identified by experts at the University Hospital of Freiburg. You can see that 177 SPIKE events are available in the Record tab. Click on a few of them a try to identify the shape of the spike.
=> 5. SCREEN CAPTURE ???
The procedure if you are marking the events by yourself is the following:
- Open a continuous file viewer, the load your reviewing environment (menu User setups)
Start by creating a group of events (in the Record tab: Events > Add group), and select it in the list of events.
Make sure that the time and amplitude resolutions are what you are used to
(right-click on the figure > Figure > Set axes resolution)Scroll through the recordings using the [<<<] and [>>>] buttons or shortcuts such as F3 or F4 (complete list and descriptions available when you leave your mouse over those buttons).
You can adjust the gain of the electrodes to observe better an event with the buttons [^] and [v] or the shortcut [Shift+mouse wheel].
- When you identify a spike, click in a white area of the figure in order to place the time cursor at the peak of the spike. If you click on the signal itself, it selects the corresponding channel, but you can use the shortcut Shift+Click to prevent this behavior and force the time cursor to be moved instead.
- Press Ctrl+E to add a marker where the time cursor is.
If you are marking multiple types of events, it is convenient to set up some additional keyboard shortcuts. Using the menu Events > Edit keyboard shortcuts, you can associate custom events to the key 1 to 9 of the keyboard. Define the name of the event type to create for each key, and then simply press the corresponding key to add/delete a marker at the current time position.
More information on the data viewer, see tutorial: ?Review continuous recordings.
=> 6. CONFIRM THE PROCEDURE ???
Pre-process recordings
- High-pass filter the recording at 0.5Hz
=> 7. APPLY 0.5 Hz FILTER TO THE CONTINUOUS RECORDINGS BEFORE IMPORTING ???
=> (NOT POSSIBLE WITH THIS FILE FORMAT AND EPOCHS TOO SHORT TO FILTER AFTER)
=> REMOVE DC OFFSET INSTEAD? WITH LONGER EPOCHS BEFORE ZERO ?
Epoching and averaging
Import recordings
Right-click on the "Link to raw file" > Import in database
Select the option "Use events" and select the category SPIKE, with 177 events.
Epoch time: [-100, +300]ms around the spike events
Uncheck "Remove DC offset": the DC offset has already been removed with the high-pass filter
You should see a new folder "SPIKE" containing 177 epochs in your database.
Average spike
- Drag and drop all the SPIKE files or the SPIKE folder into the Process1 tab
Run the process "Average > Average files", with the following options:
- Double click on the new file "Avg: SPIKE" to review it
Open a "2D sensor cap" view on the same file, or simply press [Ctrl+T] from the time series figure.
=> SCREEN CAPTURE ???- To have all the figures re-arrange themselves automatically again, select "Weighted" or "Tiled" in the "Window layout" menu (top-right corner).
- Explore this average in time with the left and right keyboard arrow.
To get a synthetic view at the sensor level of the evolution of the 2D map in time, right-click on the figure > Snapshot > "Time contact sheet: Figure" => SCREEN CAPTURES ???
Source analysis
Head model
Right-click on the channel file (or any folder containing the channel file) > Compute head model
Select the "cortex surface option" and the "OpenMEEG BEM" forward model
Leave all the OpenMEEG options to their defaults, which should be:
Noise covariance matrix
For minimum norm inverse models, we need to estimate first the level of noise at the level of the sensors. Defining what can be considered as "noise" in the middle of continuous brain recordings is a difficult question, discussed in the ?Noise covariance tutorial.
- Here we chose what is described as option 1b in the section "Noise and epilepsy" in that tutorial: we are going to calculate the noise covariance matrix using 10 seconds from the raw file that are very "quiet", ie. that contain no apparent epileptic activity, no REM and no other special artifacts. We can use for this purpose the 10s segment between 120s and 130s.
Right-click on the "Link to raw file" > Noise covariance > Compute from recordings
Select the time window [120s - 130s] and leave the other options to the default values
Inverse model
Right-click on the head model > Compute sources.
Leave all the default options to calculate a wMNE solution with constrained dipole orientation
- Compute z-score
=> 9. WHAT ARE THE INTERESTING DISPLAYS ???
=> MOVIES ? CONTACT SHEETS ? WHAT ANGLES ?
Discussion
Discuss advantage of distributed source models in the evaluation of epilepsy data compared with ECD (Kobayashi K, Epilepsia 2005)
=> 10. DEVELOPMENT ???
Moving dipoles
Illustrate John/Beth's tools for calculating and displaying dipoles.
=> 11. DOES THIS WORK ???