Method Article

Simultaneous Electroencephalography and Magnetoencephalography to Identify Seizure-Prone Brain Regions

May 29th, 2025

In This Article

Abstract

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

Source: Papadelis, C., et al., Interictal High Frequency Oscillations Detected with Simultaneous Magnetoencephalography and Electroencephalography as Biomarker of Pediatric Epilepsy. J. Vis. Exp. (2016).

This video demonstrates the method of using electroencephalography (EEG) and magnetoencephalography (MEG) recordings to identify interictal epileptiform discharges (IEDs) and high-frequency oscillations (HFOs) to locate seizure-prone regions in the brain.

Protocol

Loading...
$$\rightleftharpoonup{xx}$$ $$\longleftharp{xx}$$, $$\longrightharp{xx}$$,

All procedures involving human participants have been performed in compliance with the institutional, national, and international guidelines for human welfare and have been reviewed by the local institutional review board.

1. Data Acquisition

  1. Magnetoencephalography (MEG) and electroencephalography (EEG)
    NOTE: MEG/EEG data acquisition is performed based on the method. More details about the clinical use of MEG in pediatric epilepsy can be found elsewhere.
    1. Record MEG signals with a whole-head MEG system.
      NOTE: The MEG system employs thin-film sensors of two types (planar gradiometers and magnetometers) integrated on 102 sensor elements. Each element contains a magnetometer that consists of a single coil and two orthogonal planar gradiometers that consist of a "figure-of-eight"-type coil configuration. The magnetometer measures the magnetic flux perpendicular to its surface, and the gradiometers measure the difference between the two loops of the "eight," or the spatial gradient. The MEG system has 204 planar gradiometers and 102 magnetometers (306 sensors in total). MEG systems from different vendors have different numbers and types of coils (i.e., axial gradiometers).
    2. Record simultaneously EEG signals using a nonmagnetic 70-channel electrode cap with Ag/AgCl sintered ring electrodes and additional electrodes in T1/T2. Use a common reference montage.
    3. Close the door of the Magnetic shielded room (MSR). Communicate with the patient via an intercom system to check if he/she feel comfortable. Ask the parent to stay inside the MSR during the recording if the child feels uncomfortable staying alone.
    4. Start the recordings by clicking the 'Go' button in the MEG acquisition software. Use a high sampling rate of 1 KHz (or more). Use a low-pass Infinite Impulse Response (IIR) filter of 6th order at 400 Hz. Check all the recorded signals online. Fix bad MEG channels by using a sensor tuner.
      NOTE: Bad MEG channels are defined as sensors (gradiometers or magnetometers) that have a relatively high level of white noise (above 2 to 5 fT/√Hz for magnetometers) or sensors that record spurious environmental electromagnetic noise. This usually happens when the sensors are exposed to strong (relative to the signals measured) magnetic fields, and specific parts of the coils "trap" the magnetic flux, destroying the superconductivity. A sensor tuner is then used to heat the coil by applying an electric current through it. This procedure is called tuning and is used when the white noise level of the sensor is above a specific threshold (i.e., 2 - 5 fT/√Hz). Some MEG systems do not have sensor tuners.
    5. Measure the patient's head position by clicking the 'Measure' button in the MEG acquisition software. If the sensory array does not cover the patient's head well, ask the patient to move his/her head deeper into the helmet.
      NOTE: This maneuver activates the 4 Head Position Indicator (HPI) coils by applying transient oscillatory electrical signals through them, which generate artificial magnetic fields. The MEG sensors detect these fields and determine the head position. The procedure may differ between different MEG vendors.
    6. Record MEG, EEG, and peripheral recordings by clicking the 'Record' button in the MEG acquisition software (i.e., electrocardiogram or ECG, electrooculogram or EOG, and electromyogram or EMG) for ~60 min.
      NOTE: The data is stored as a .fif file in the Redundant Arrays of Independent Disks (RAID). The file type is different for other MEG vendors.
    7. When the recording ends, open the MSR, disconnect the cables, and remove the patient from the MSR room. Gently remove all the tapes, electrodes, HPI coils, and EEG cap. Wash the patient's head.
    8. After the acquisition is completed, record the magnetic signals of the empty MSR without the patient. Start the recordings by clicking the 'Go' button in the MEG acquisition software. Record MEG data for 2 min.
      NOTE: This data is used for estimating the environmental electromagnetic noise.

2. Identification of Interictal Activity

  1. Open the data using Brainstorm, which is documented and freely available for download online under the GNU General Public License.
  2. Select visual portions of the EEG data with interictal activity occurring at least 2 h apart from clinical seizures.
    NOTE: Figure 1 presents a portion of EEG and MEG data with frequent IEDs.
    1. Identify empirically well-defined interictal epileptiform discharges (IEDs) in the EEG signals: this includes spikes (20 - 70 ms) and sharp waves (70 - 200 ms).
      NOTE: The clinical significance of both types of IEDs in epileptic focus localization is equivalent.
    2. Try to identify (if possible) portions of the recordings with: (i) minimal motion artifacts, (ii) more than 3 - 4 IEDs per 10 s display, and (iii) slow-wave non-REM sleep that usually presents a high number of high-frequency oscillations (HFOs).
  3. Using Brainstorm, display the data with standard display settings (10 s/page). Go to the Filter tab and set the following filter display parameters: high-pass filter: 1 Hz, Low-pass filter: 80 Hz, and Notch filter: 50 or 60 Hz (according to the frequency of the power line). Inspect the data and identify portions of it with IEDs.
    NOTE: Only portions of the signal with IEDs will be scanned to look for HFOs. The selected filters are for visualization only; they have not been applied to the data. To permanently apply these filters to the data, use a band-pass Butterworth filter (4th order) following the instructions on the Brainstorm website (http://neuroimage.usc.edu/brainstorm/).
  4. Mark the peak of each IED occurring in both EEG and MEG data (see red spots in Figure 1).
    NOTE: More details about marking IEDs using Brainstorm can be found elsewhere (http://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy).

3. Semi-automated Detection of HFOs in Simultaneous Scalp EEG and MEG Data

NOTE: Here we describe a semi-automated method to detect HFOs, which includes an automated detection (Figure 2), followed by a visual review of the automatically detected HFOs. In order to avoid the spurious oscillations of sharp transients as true ripples and to ensure that the HFOs are not due to a filtering phenomenon, we followed the latest suggestions in the relevant literature: we required the HFOs to have a minimum number of 4 oscillations since it has been observed that the impulse response of the filter has fewer oscillations than the chosen number of cycles50, we used the Finite Impulse Response (FIR) filter to minimize ringing effect and the "Gibbs" phenomenon50, we required the candidate HFO events to be inspected also visually by an expert to check whether the HFOs were also visible overlaid on the IEDs, and we required an isolated island to be observed in the time-frequency plain because a sharp event and an oscillation have different signatures: a real HFO is represented by an isolated peak in the time-frequency plot (restricted in frequency, as "island") located in the band of 80 - 500 Hz, while a transient event generates an elongated blob, extended in frequency.

  1. Automatic HFO detection
    NOTE: Figure 2 describes the flow chart of the automatic detection of HFOs on each EEG signal. The goal of the developed method is to reduce the burden for the EEG expert of marking HFO events on each EEG channel using a 2 s/page display that is recommended for the visual inspection of HFOs. An HFO was defined as an event within the ripple frequency band (80 - 250 Hz), which has at least 4 oscillations of sinusoidal-like morphology standing out from the surrounding background, and which appears as a short-lived event with an isolated spectral peak at a distinct high frequency.
    1. Detection of candidate HFOs in the time domain
      1. Band-pass (BP) filters the EEG signals between 80 and 250 Hz, restricting their frequency content to the ripple band of interest.
        NOTE: It is recommended to use an FIR filter to minimize the ringing effect and the "Gibbs" phenomenon, and zero-phase digital filtering to avoid phase distortion.
      2. Calculate the envelope of the BP signal using the Hilbert transformation. Calculate the mean and the standard deviation (SD) of the envelope over 10 s sliding windows centered on each point of the time series. Estimate the overall mean and SD using the median value over all the windows (in order to obtain values that are robust to the possible presence of portions of the signal with many HFOs and high SD).
      3. Calculate the envelope's z-score and mark a candidate HFO every time it is higher than the minimum threshold, which is set to 3.
      4. Define the starting and ending points of the detected event as the upward and downward crossings of half the threshold. Consider the HFOs with an inter-event interval of less than 30 ms as one single HFO. Calculate the number of peaks in the BP signal between the HFO starting and ending points, and discard events with less than 4 peaks. Also, discard events with a z-score higher than 12.
        NOTE: Modify your maximum z-score threshold according to the amplitude of the artifacts that may occur in your recordings. Events with a low number of oscillations can be caused by filtering effects, whereas events with extremely high amplitudes can be due to muscle or electrode artifacts.
    2. Reject possible artifacts in the time-frequency domain.
      NOTE: This step is necessary to distinguish real HFOs from events that might be elicited by other EEG activity and filtering artifacts, whose frequency content is not restricted to the frequency band of interest. It is based on the assumption that a real HFO appears as a short-lived event with an isolated spectral peak at a distinct frequency above 80 Hz, in contrast with a transient event that generates an elongated blob extended in frequency. Figure 3 illustrates an example of a detected HFO showing the BP-filtered EEG signal (upper panel), its envelope (middle panel), and the corresponding time-frequency plane (lower panel), during the period of [-0.5, +0.5] s around the HFO peak. The display of the time-frequency plane is restricted from 80 - 150 Hz because no prominent activity was observed for frequencies above 150 Hz.
      1. Transform all candidate HFOs events into the time-frequency space using the Morlet transformation in the frequency range from 1 Hz to the highest frequency of interest, i.e., 250 Hz (central frequency = 1 Hz, Full-Width-At-Half-Maximum = 3 s).
      2. Analyze the instantaneous power spectra of the time-frequency representation over each time point of the event duration. For each power spectrum, follow the automatic criteria to detect the peak in the high-frequency band and to verify whether it is clearly distinct from the closest peak in the lower frequency range. Discard HFOs that do not show a power spectrum with an isolated high-frequency peak in at least 90% of the time points.
  2. Sort all the detected HFO events by their temporal occurrence across channels. Group together all the consecutive HFOs whose duration overlaps. Keep only groups of HFOs involving at least two EEG channels for further analysis.
    NOTE: The algorithm requests that the HFOs occur in at least 2 channels to avoid capturing spurious random artifacts, which may resemble real HFOs and occur in single EEG leads. Two consecutive HFOs are considered to overlap when the starting time of the second HFO precedes the starting time of the first one.
  3. Visual review of HFO events
    1. Vertically align 2 computer screens; one for the inspection of EEG and one for the inspection of MEG signals. Display the detected events on both the expanded (2 s/page) and typical scale (10 s/page), showing, respectively, the 80 - 250 Hz and the 1 - 40 Hz BP filtered signals.
    2. Ignore events co-occurring with muscle or electrode artifacts in the unfiltered EEG and MEG, as well as events with large frequency variability, irregular morphology, or large amplitude variations.
    3. Observe the EOG and EMG signals during the detection of the HFOs and discard any event that is thought to correspond to EOG or muscular activity. Consider only the HFOs that overlap with EEG/MEG IEDs, as they are more likely to be true HFOs.
      NOTE: This approach offers high specificity at the cost of low sensitivity; thus, it provides confidence that the identified HFOs are of cortical origin.
    4. Keep only HFO events that occur in both EEG and MEG signals at the same time.

4. Source Localization of IEDs and HFOs

  1. Localize the generators at the peak of the MEG IEDs, using the Equivalent Current Dipoles (ECD). Use the Minimum Norm Estimates software that is freely available (http://martinos.org/mne/stable/index.html). Consider only spikes with goodness-of-fit (GOF) > 80% and dipole moment Q<500 nA - m. Overlay the ECD location on the MRI of each patient.
    NOTE: The Maximum Entropy on the Mean (MEM) is an attractive alternative method that determines the location and extent of the sources.
  2. HFO source localization at both EEG and MEG using the wavelet Maximum Entropy on the Mean (wMEM) method.
    NOTE: The MEM is an efficient technique that has been successfully used to determine the location and extent of sources of epileptic activity. The wMEM is an extension of MEM that has been developed for localizing oscillatory activity as evaluated with realistic simulations. It decomposes the signal on a discrete wavelet basis before performing MEM source localization on each time-frequency box. Thus, wMEM is particularly well suited to localize HFOs.
    1. Segment the MRI and obtain the cortical surface using Freesurfer.
    2. Solve the EEG/MEG forward problem with the boundary element method (BEM) for a 3-layer model using OpenMEEG.
    3. Resample the signals to 640 Hz in order to ensure that the second scale of the discrete wavelet transform corresponds to the frequency band of interest.
    4. Estimate the noise covariance matrix in the data space independently for each HFO, based on the background in the ripple band in a 150 ms window immediately before each HFO. Perform the source localization for each HFO in the ripple band and average along the HFO duration. NOTE: The resulting map consists of a cortical activation value associated with each vertex of the cortical tessellation.
    5. Normalize each map in order to have a maximum activation value equal to 1 for each HFO.
    6. Compute the average of the activation values across all HFOs at each vertex. Apply a threshold of 60% of the maximum activation in order to display the final maps over the cortical surface.

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
VectorView MEG systemElekta-Neuromag, Finland MEG System
Magentically Shielded RoomImedco, Hagendorf, Switzerland Three-layer MSR
EEG systemElekta-Neuromag, Finland 70 Channel EEG system
3D digitizerPolhemus, Colchester, VT

Reprints and Permissions

Request permission to reuse the text or figures of this JoVE article

Request Permission

Tags

ElectroencephalographyMagnetoencephalographyInterictal Epileptiform DischargesHigh Frequency OscillationsSeizure Prone Brain RegionsSimultaneous EEG MEGSource LocalizationWavelet Maximum EntropyCortical Surface MappingBrain Imaging Analysis

Related Articles