Tutorial 5: Epileptogenicity maps

The goal of this tutorial is to create 3D maps of epileptogenicity, with the expectation they indicate the location and extent of the seizure onset zone, and maps of propagation delay in the patient's brain.


The method used for computing the epileptogenicity maps is described in this article:
David O, Blauwblomme T, Job AS, Chabardès S, Hoffmann D, Minotti L, Kahane P
Imaging the seizure onset zone with stereo-electroencephalography
Brain. 2011 Oct;134(10):2898-911

Seizure #1

The first seizure is short (around 5s), without any propagation. We will compute only the epileptogenicity map for this one, no delay maps.

Click on [Epileptogenicity]:

Interactive options:

  • Select EEG mat file: tutorial_epimap/seeg/bSZ1.mat
  • Select baseline EEG mat file: tutorial_epimap/seeg/Baseline_bSZ1.mat
  • Peri-onset time: 0s
    List of time points for which we want to compute an epileptogenicity map, with respect to the seizure onset. There is no expected propagation here, we want to study only the first seconds immediately after the onset marker (0-3s).
  • Frequency band [Hz]: [120 200]
    Frequency band specific of the beginning of the seizure (see previous tutorial)
  • Type of output: Volume
    You have the option to run this computation on the full MRI volume, or on the cortex surface only. The computation on the surface is faster, but the result has to be displayed on the surface as well. The following tutorial will illustrate this option.
  • Select atlas: Human
  • Use cortical mesh: Yes
    Defines the method for computing the interpolation from the sEEG contacts to the MRI volume. Using the cortical mesh limits the interpolation to the voxels that are close to the grey matter. Answering "No" to this option uses all the voxels in the neighborhood of each voxel, which may cause some activated voxels to be represented outside the brain or in the white matter.
  • Select MRI: tutorial_epimap/anat/MRI/wBrainPre.nii
    The cortical mesh used to constrain the interpolation sEEG-MRI is created from this normalised MRI using SPM functions (canonical mesh, not individual mesh).
  • Mesoscopic time scale: 3s
    Duration of the time window used to estimate the epileptogenicity map.
  • Time-resolution: 0.2s
    Each 3s window is subdivided in small blocks of 0.2s, the power in each block is estimated for the frequency band 120-200Hz, and a t-test is performed with SPM for all the 0.2s blocks in the baseline vs. all the 0.2s blocks in the time window of interest (post-onset). The result of this t-test is the epileptogenicity map.
  • Propagation threshold (p or T): 0.05
    Related to the computation of the delay map, so not applicable here. The epileptogenicity maps computed for each 3s window are thresholded using this threshold, then grouped into one single delay map. If the value is <1, it is interpreted as a p-value, otherwise it is intepreted as a T-value threshold
  • AR correction: No
    Standard SPM correction for temporal auto-correlation of the samples (changes a bit the p-values)
  • File name: (leave empty)
    Prefix of the output file names

This function creates a new folder tutorial_epimap/seeg/SPM_EI_bSZ1_120_200_3_0. The naming of this folder corresponds to the input parameters:

  • SPM_EI: Same prefix for all the folders
  • _bSZ1: Input filename
  • _120_200: Frequency band specific of the seizure onset zone (in Hertz)
  • _3: Duration of the time window of interest (in seconds)
  • _0: Latency of interest, with respect to the seizure onset
  • This folder contains the epileptogenicity map, ie. the t-statistic for the contrast seizure-baseline: spmT_0001.nii.

Seizure #1: Display with SPM

You can use the SPM button [Results] to display the epileptogenicity map for SZ1, ie. the results of the t-test seizure-baseline.

  • Select SPM.mat: tutorial_epimap/seeg/SPM_EI_bSZ1_120_200_3_0/SPM.mat
  • Select the only contrast available in the list, click [Done].
  • Apply masking: None
  • p-value adjustment to control: FWE
  • p-value (FWE): 0.05
  • & extent threshold (voxels): 0
  • Data type: Volumetric (2D/3D)
  • Select Overlays > Sections: tutorial_epimap/anat/MRI/wBrainPre.nii

Seizure #1: Display with ImaGIN

You can reproduce a similar display with the the ImaGIN volume viewer. Click on [Brain Overlay].    ImaGIN_Disp3D.m

  • Image of p-values: No
  • Select 3D data file: tutorial_epimap/seeg/SPM_EI_bSZ1_120_200_3_0/spmT_0001.nii
    This volume is in MNI space.
  • Select another 3D data file: No
  • Connections associated: No
  • Plot electrodes: Yes
  • Select electrode positions file (.txt or .mat/.dat): tutorial_epimap/seeg/bSZ1.mat
    You can actually select any of the bSZ* file, they all contain the same electrode positions (all in MNI space).
  • Sign of the values: Positive
    This will display only the positive t-values, corresponding to higher power during the seizure than during the baseline.
  • Amplitude threshold: 3.825
    Displays only the values superior to the specified threshold and masks out all the others. This value of 3.825 comes from the previous SPM Results figure (Height threshold T), which corresponded to a p-value of 0.05, FDR-corrected.
  • T1 template overlay: No
    Selecting "No" will prompt later for the selection of the patient's MRI.
  • Species: Human
  • Color for electrode set 1: Any color
  • Select image for rendering on: tutorial_epimap/anat/MRI/wBrainPre.nii
    MRI of the patient, normalized in MNI space (indicated by the prefix "w").

Seizures #2/3

These two other seizures last longer and propagate to other regions after a few seconds. We will evaluate the propagation delays for the first 20s.

Click on [Epileptogenicity] and select the following options:

  • Select EEG mat file: bSZ2.mat + bSZ3.mat
  • Select baseline EEG mat file: Baseline_bSZ2.mat + Baseline_bSZ3.mat
  • Peri-onset time: 0:2:20
    Computes the epileptogenicity maps for sliding windows of 3s between 0s and 20s post-seizure (ie. 0-3s, 2-5s, 4-7s, 20-23s…), then summarize these results in delay maps with a 2s resolution.
  • Select atlas: Human
  • Frequency band [Hz]: [120 200]
  • Use cortical mesh: Yes
  • Select normalised MRI: tutorial_epimap/anat/MRI/wBrainPre.nii
  • Mesoscopic time scale: 3s
  • Time-resolution: 0.2s
  • Propagation threshold (p or T): 0.05
  • AR correction: No
  • File name: (leave empty)

This function creates many new files and folders:

  • 11 x SZ2 folders: SPM_EI_bSZ2_120_200_3_*, one folder for each 3s time window defined in input: 0s, 2s, 4s, …, 20s
  • 11 x SZ3 folders: SPM_EI_bSZ3_120_200_3_*, same as SZ2
  • 11 x Group folders: SPM_EI_Group__120_200_3_*, joined analysis for SZ2 and SZ3
  • 3 x delay maps: Delay_EI_*_120_200_3_50.nii (SZ2, SZ3, Group)
  • 3 x smoothed delay maps: sDelay_EI_*_120_200_3_50.nii (SZ2, SZ3, Group)

Seizures #2/3: Display the epileptogenicity maps

You can display the epileptogenicity maps at each time point (0s, 2s, …, 20s), with either menu described previously ([Results] or [Brain overlay]). Open file files SPM_EI_*_120_200_3_0 / spmT_0001.nii, which contain the same results as the one obtained for SZ1 (t=0s).
The observations are reproducible across seizures (from left to right: SZ2, SZ3, Group=SZ2+SZ3), and we can notice that there are some temporal regions involved here that were not visible in the first seizure.

Seizures #2/3: Display the propagation maps

The propagation maps show a summary of the epileptogenicity maps at different time points after the seizure onset. In this example, we computed 11 epileptogenicity maps for SZ2 and SZ3, for sliding windows of 3s (t1=0-3s, t2=2-5s, t3=4-7s, …, t11=20-23s). These maps of t-statistics were thresholded under a given significance level (p<0.05). If a voxel is significantly activated in the epiptogenicity map at t=ti, the value for this voxel in the propagation map is ti, for i=1..11. At the end, the value of each voxel represents the latency for which the activity in this voxel becomes significantly higher than during the baseline. The color bar in the figures below represent the time, from 0 to 20 seconds. To change the color map, use the menu SPM Figure > Colors > Colormap > Gray-Jet.

To display these propagation maps, click on [Brain overlay] and select one of the files: Delay_EI_*_120_200_3_50.nii

Alternatively, you can display the smoothed delay maps, with the prefix "s": sDelay_EI_*_120_200_3_50.nii

Next tutorial: Tutorial 6: Analysis in patient space