iEEG-recon: A fast and scalable pipeline for accurate reconstruction of intracranial electrodes and implantable devices

Epilepsia. 2024 Mar;65(3):817-829. doi: 10.1111/epi.17863. Epub 2024 Jan 10.

Abstract

Objective: Clinicians use intracranial electroencephalography (iEEG) in conjunction with noninvasive brain imaging to identify epileptic networks and target therapy for drug-resistant epilepsy cases. Our goal was to promote ongoing and future collaboration by automating the process of "electrode reconstruction," which involves the labeling, registration, and assignment of iEEG electrode coordinates on neuroimaging. We developed a standalone, modular pipeline that performs electrode reconstruction. We demonstrate our tool's compatibility with clinical and research workflows and its scalability on cloud platforms.

Methods: We created iEEG-recon, a scalable electrode reconstruction pipeline for semiautomatic iEEG annotation, rapid image registration, and electrode assignment on brain magnetic resonance imaging (MRI). Its modular architecture includes a clinical module for electrode labeling and localization, and a research module for automated data processing and electrode contact assignment. To ensure accessibility for users with limited programming and imaging expertise, we packaged iEEG-recon in a containerized format that allows integration into clinical workflows. We propose a cloud-based implementation of iEEG-recon and test our pipeline on data from 132 patients at two epilepsy centers using retrospective and prospective cohorts.

Results: We used iEEG-recon to accurately reconstruct electrodes in both electrocorticography and stereoelectroencephalography cases with a 30-min running time per case (including semiautomatic electrode labeling and reconstruction). iEEG-recon generates quality assurance reports and visualizations to support epilepsy surgery discussions. Reconstruction outputs from the clinical module were radiologically validated through pre- and postimplant T1-MRI visual inspections. We also found that our use of ANTsPyNet deep learning-based brain segmentation for electrode classification was consistent with the widely used FreeSurfer segmentations.

Significance: iEEG-recon is a robust pipeline for automating reconstruction of iEEG electrodes and implantable devices on brain MRI, promoting fast data analysis and integration into clinical workflows. iEEG-recon's accuracy, speed, and compatibility with cloud platforms make it a useful resource for epilepsy centers worldwide.

Keywords: drug-resistant epilepsy; intracranial electrodes; machine learning; multimodal; presurgical planning.

MeSH terms

  • Electrocorticography* / methods
  • Electrodes
  • Electrodes, Implanted
  • Electroencephalography / methods
  • Epilepsy* / diagnostic imaging
  • Epilepsy* / surgery
  • Humans
  • Magnetic Resonance Imaging / methods
  • Prospective Studies
  • Retrospective Studies