A modular and flexible pipeline for intraoperative electrode reconstruction and localization in patients with brain lesions.
Authors
Affiliations (8)
Affiliations (8)
- College of Medicine, Northeast Ohio Medical University, Rootstown, OH, United States.
- Department of Neurology, Mass General Brigham, Boston, MA, United States.
- Center for Neurotechnology and Neurorecovery, Boston, MA, United States.
- Division of Neuro-Oncology, Department of Neurosurgery, University of California, San Francisco, San Francisco, CA, United States.
- Department of Neurosurgery, Mass General Brigham, Boston, MA, United States.
- Department of Neurosurgery, Oregon Health State University, Portland, OR, United States.
- Department of Neurosurgery, University of California, San Diego, La Jolla, CA, United States.
- Center for Neuro-Oncology, Department of Medical Oncology, Dana-Farber Cancer Institute, Boston, MA, United States.
Abstract
Intraoperative intracranial electrophysiological recordings provide unique access to human cortical dynamics but remain difficult to translate across patients due to inconsistent localization of transient surface electrodes. Unlike chronic implantations, intraoperative electrodes are placed transiently, rarely visible on imaging, and often inconsistently documented. We present an open-source imaging pipeline, ALIGNER (Advanced Localization and Imaging Guidance for Neurosurgical Electrode Recording), designed to reconstruct intraoperative surface electrode array placements and quantitatively map neural activity to individualized anatomical and pathological substrates. By enabling anatomical localization of these electrodes, this framework supports systematic analysis of spatial gradients in neural activity relative to pathological tissue. We developed a multimodal reconstruction framework integrating pre- and postoperative MRI and CT, cortical surface modeling, semi-automated pathology segmentation, intraoperative photographs or videos when available, and physics-based electrode modeling. To improve robustness in cases with distorted anatomy, artificial intelligence tools such as SynthSR were used to enable reliable cortical surface reconstruction prior to FreeSurfer processing. A monocular depth-estimation network was incorporated to constrain electrode placement in conjunction with Blender cloth-physics simulation when photographic images were available, while atlas- and note-guided inference supported reconstruction otherwise. The pipeline was applied to 38 neurosurgical patients across drug-resistant epilepsy resection (<i>n</i> = 24), malformation (<i>n</i> = 1), brain tumor (<i>n</i> = 11), and deep brain stimulation (<i>n</i> = 2) cases, achieving some type of reconstruction and electrode localization in all participants. By exporting electrode coordinates for quantitative spatial analyses, including distance-based mapping relative to lesions and resection cavities, ALIGNER enables anatomically grounded and reproducible analysis of intraoperative electrophysiology. This open-source framework provides foundational infrastructure for cancer neuroscience studies of tumor-neuron interactions and establishes a scalable platform for future neurostimulation, implantable neurodevice, and brain-computer interface applications requiring precise anatomical localization.