Abstract
Implantation of electrodes in the brain has been used as a clinical tool for decades to stimulate and record brain activity. As this method increasingly becomes the standard of care for several disorders and diseases, there is a growing need to quickly and accurately localize the electrodes once they are placed within the brain. We share here a protocol pipeline for localizing electrodes implanted in the brain, which we have applied to more than 260 patients, that is accessible to multiple skill levels and modular in execution. This pipeline uses multiple software packages to prioritize flexibility by permitting multiple different parallel outputs while minimizing the number of steps for each output. These outputs include co-registered imaging, electrode coordinates, 2D and 3D visualizations of the implants, automatic surface and volumetric localizations of the brain regions per electrode, and anonymization and data sharing tools. We demonstrate here some of the pipeline’s visualizations and automatic localization algorithms which we have applied to determine appropriate stimulation targets, to conduct seizure dynamics analysis, and to localize neural activity from cognitive tasks in previous studies. Further, the output facilitates the extraction of information such as the probability of grey matter intersection or the nearest anatomic structure per electrode contact across all data sets that go through the pipeline. We expect that this pipeline will be a useful framework for researchers and clinicians alike to localize implanted electrodes in the human brain.
Introduction
Patients with medication-resistant epilepsy can be candidates for surgical treatments for alleviating seizure burden that typically involve intracranial electrode implants to accurately identify the seizure onset area(s) [1–6]. These surgically implanted electrodes consist of two types: 1) contacts along thin tubes that extend into the brain (also intraparenchymal depths) targeting subcortical brain regions or deep cortical structures, which we call stereotactic electroencephalography (sEEG) electrodes, or 2) grids and strips on silastic sheets that lay on the cortical surface, which we call electrocorticography (ECoG) electrodes. These electrodes are designed to record neural activity, intracranial EEG (iEEG), with the goal of delineating the seizure onset zone (SOZ) for further clinical interventions such as resection, ablation, or stimulator placement [1,2,7–10]. Intracranial brain recordings via these electrodes also allow for the study of brain activity during other cognitive and physiological processes otherwise not possible with non-invasive measures [1,11–14]. In addition, multiple groups have begun using sEEG and ECoG electrodes in clinical trials to identify locations for deep brain stimulation to treat severe depression [15–18].
A key requirement to achieving clinical and research goals is the precise localization of the implanted electrodes relative to brain regions. Most methods for localization use spatial co-registration of the pre-implantation MRI with a post-implantation CT or MRI to produce a visual representation of the implanted electrodes [5,19–26]. Several implementations involve all-in-one software packages that provide validated pipelines for localizing electrode locations [1,19,22–30], and some pipelines require an experienced radiologist to identify the brain locations of each electrode contact manually [1,5]. In addition, some co-registration pipelines require the pre-operative and post-operative scans to first be transformed into a standardized brain space (e.g., Montreal Neurological Institute (MNI) space) before identifying electrode locations [28,29]. There are various methods for a user to achieve their goal when attempting to localize implanted electrodes, but here we lay out a protocol involving multiple software packages that we have used in a large data set (>260 patients) and which we have used to address many neuroscientific and clinically-relevant goals [5,6,11–14,30–38].
Our protocol incorporates several different software packages and methods and facilitates the incorporation of additional packages and their outputs depending on user skill and need. The overarching outputs of the protocol are (1) visualization of the electrodes, (2) localizations of the electrodes relative to the brain, (3) algorithmic localization of electrodes to brain structures, (4) data curation into an anonymized, shareable format, and (5) additional quantitative tools for identifying specific electrode placement relative to white matter, grey matter, subcortical regions, or whether contacts are outside brain. Regardless of the use case, we attempt to lay out the pipeline to be clear and easy to follow to maximize reproducibility across users.
We developed and designed our protocol pipeline to achieve three major benefits: first, (1) it is modular in execution with flexible optional outputs; (2) it is easy to use with steps explained in plain terms, even for naïve users; and (3) it maps electrodes to the patient’s native space for electrode localization.
First, modularity both in the steps and the output is of particular importance so that we have a multi-purpose pipeline which does not require knowledge or execution of all steps in the entire protocol. For example, we anticipate that clinicians may only require the 2D or 3D visualization outputs from this pipeline, while neuroscience researchers may want to quantify electrode locations with respect to brain regions and anatomical features. To this end, we note what steps are optional for specific final products. Another aspect of this modularity is that other pipelines or changes to the programming code can be added by the user with relative ease. All of the code for this protocol is documented and open to changes as desired, and we include references to alternative software and methods for different steps within the protocol.
Second, our protocol is built to be accessible to users with minimal programming experience, allowing even naïve users to follow the steps to achieve the output of interest. The relevant MATLAB code uses mostly basic MATLAB functions with a few additional provided functions to assist users who do not have access to paid MATLAB toolboxes. The Python and Bash commands are also easily implemented and rarely need to be altered. Orienting radiological images (MRI) in 3D space, creating images, and saving images are all automatic. This is particularly advantageous in the sense that a potential user need not have specialized knowledge of neuroanatomical landmarks to be able to perform successful coregistration of the pre-operative MRI (before electrode implants) and post-operative images (CT or MRI with implanted electrodes) [25,28]. We also include information on how to install the necessary software packages, as well as information which will help naïve users to follow this pipeline with minimal effort, including videos and example data [39].
Finally, our images and electrode coordinates remain in the patient’s native space. This is especially important for patients with substantial abnormalities in their brain structure due to lesions or prior surgery. Such alterations in anatomy can make morphing into a common brain space problematic. Relevant to this point, we further include two different approaches to map electrodes to brain regions identified through the automatic parcellation and segmentation of the patient’s brain into common atlas space [5,30,40–42]. We incorporate the preservation of native space and the transformation in a common space in order to improve the flexibility of this pipeline.
Notably, our pipeline is not a single software package but is a methodology that takes advantage of multiple software packages, utilizing the strengths of each package for an expandable and flexible pipeline for electrode localization (S1 Fig). With the minimum installation of 2 pieces of software, and a total of 5 downloads, we demonstrate a working pipeline which can create 2D and 3D visualizations of iEEG electrodes along with automatic, algorithmic localization of electrode contacts to brain structures and brain regions using multiple approaches. This protocol has been followed by multiple users, ranging from individuals new to programming to adept programmers, to reconstruct electrode locations in over 260 patients with iEEG across multiple hospitals. The pipeline also incorporates software for de-identified output using the iEEG BIDS formatting which is crucial in accelerating data sharing [43]. In addition, in the hands of advanced users, portions of the software in the pipeline identifies electrode contact location relative to brain features and permits visualization of real-time activity on 3D brain surfaces [30].
Materials and methods
The protocol and pipeline pertains to the mapping of electrode locations for recorded intracranial neural activity from patients undergoing invasive monitoring, typically for medication-resistant epilepsy [39]. Participants undergoing invasive monitoring could be implanted with stereo-electroencephalography (sEEG) and/or ECoG grids and strips to locate epileptogenic tissue in relation to essential cortex. In the examples used here, depth electrodes (Ad-tech Medical, Racine WI, USA, or PMT, Chanhassen, MN, USA) with diameters 0.86–1.27 mm and 4–16 platinum/iridium-contacts 1–2.4 mm long with inter-contact spacing ranging from 4–10 mm (median 5 mm) were placed based on the clinical indications for seizure localization determined by a multidisciplinary clinical team independent of this research.
The series of steps for this pipeline are briefly listed below with the relevant references (Fig 1). However, the detailed steps (including video) of the protocol described here is published on protocols.io, https://www.protocols.io/view/modular-reconstruction-and-co-registration-of-imag-5qpvornedv4o/v2 [39]) and is included for printing as S1 File with this article. The protocol is the definitive guide for installation and execution of the pipeline we describe here.
In terms of the necessary computational hardware to support this pipeline, the reconstruction steps using FreeSurfer are the most demanding. Therefore, we recommend that the system meet their requirements (https://surfer.nmr.mgh.harvard.edu/fswiki/rel7downloads) as the rest of the pipeline is less computationally intense. There are four main hardware requirements: (1) Intel processor supporting AVX instructions, (2) 8GB of RAM for the reconstruction, or 16GB of RAM for better graphical viewing, (3) a 3D graphics card with its own memory and accelerated OpenGL drivers, and finally (4) around 300MB of free hard drive space per processed subject.
Though this protocol was created with first-time, naïve users in mind, it must be understood that this protocol is intended as less of a pedagogical tool and more as a guide for researchers familiar with the input (e.g. brain imaging), output, and motivations of localizing electrodes in the brain. As such, some of the steps described below may take much longer for users new to these concepts. For this reason, in the online protocol, we include videos which capture the sequence of steps needed such that users have both written and visual instructions to follow the steps [39]. Further, the protocol is designed to have multiple, parallel outputs such that users can stop at one step and not proceed to the next steps (Figs 1 and S1; Table 1).
Table 1. Required and optional steps for arriving at specific output in the protocol.
Basic Pipeline | 2D Visuals Only | Advanced Pipeline | |
---|---|---|---|
Protocol
Steps |
Steps 1–6 | Steps 1 and 3–6 | All Steps, 1–10 |
Output |
• RAS coordinates • Reconstructed Surface • 2D Visuals of electrodes on the preoperative MRI • 3D Visuals of electrodes in the Freesurfer reconstructed brain |
• RAS coordinates • 2D Visuals of electrodes on the preoperative MRI |
• RAS coordinates • Reconstructed Surface • 2D Visuals • 3D Visuals • ELA probabilities • BIDS Files Structure • EVL localizations • Nearest Anatomical Structure • Grey/White Distances • De-faced Imaging |
This table lists the three main use cases for this pipeline at the top with their corresponding steps and output below.
Step 1: Retrieve images, 5–10 minutes
Following implant, the pre-operative T1-weighted MRI before contrast is acquired along with the post-operative CT or MRI with electrodes implanted. These images do not have to be anonymized or named anything in particular at this step.
Step 2: Freesurfer reconstruction output, 3–10 Hours
To reconstruct the brain regions and parcellate/segment the brain regions from the MRI, we used the recon-all function from the FreeSurfer scripts (http://surfer.nmr.mgh.harvard.edu) on the pre-operative T1-weighted MRI [41,42,44–61] followed by functions which subdivided brain regions based on the Desikan-Killiany-Tourville Cortical Atlas (DKT) using default parameters [42]. This step is time-consuming and is not necessary if only the 2D visualizations from Step 6 are desired. However, there are different paths for different outputs associated with this pipeline which are detailed both in Table 1 and in two flow charts (Figs 1 and S1). For the output from the “Basic” or “Advanced” pipelines, we find starting Step 2 as soon as possible, even before the initial electrode implant, can offset the amount of time the FreeSurfer pipeline takes.
Step 3: Imaging co-registration with freeview, 5 minutes
The pre-operative T1-weighted MRI is co-registered with a post-operative CT using volumetric image co-registration procedures using FreeSurfer tools (http://surfer.nmr.mgh.harvard.edu), [41,42,44–61] specifically using Freeview and default parameters. These procedures rely on linear transformations of the post-operative imaging onto the pre-operative imaging. A key point is that all the imaging is registered to a single identified pre-operative T1-weighted MRI scan. As such, if multiple CT scans are performed, each can be registered to the single pre-operative T1-weighted MRI scan sequentially such that the coordinates can be mapped to the same space. A short video of how this is performed is included in the protocols.io publication [39]. Optionally, we have also found we could use Mango [62–64] or LeadDBS [29] for this alignment step, since the coordinates just need to be in the native space of the pre-operative MRI (S1 Fig).
Step 4: Identifying RAS coordinates, 0.5–2 hours
Electrode coordinates are manually determined from the overlaid electrodes (from the post-operative CT or MRI) in the patient’s native space [5]. The length of time this step takes depends on many factors including: the resolution of the post-operative scans, the number of electrodes, knowledge of the relative locations for each electrode, and the skill level of the user. There is a short video example of identifying these coordinates in the protocols.io publication [39].
Step 5: Snapping the electrode grid, 30 minutes
When grid and strip electrodes on the surface of the brain are implanted, there is a shift and compression in the brain as a result of the surgery, which can lead to the electrodes being incorrectly mapped relative to the pre-operative MRI. Various researchers have identified algorithms to shift the electrodes to the surface of the brain while constraining the relationships between contacts, though these details are reported and validated elsewhere [21,65,66]. We use the extracted and smoothed surface of the pre-operative MRI as a target for snapping the grids and strips, specifically using the method detailed in Dykstra et al. [5]. This method was selected for its ease of use with the pipeline, but many other pipelines can handle this step as well if desired (Table 2, S1 Fig) [5,21,65,66].
Table 2. Features of this pipeline and alternatives.
Pipeline Name | Image Registration | Freesurfer-Compatible | Snap to Cortical Surface | Automatic Visualizations | Electrode Region Labelling | Native Space | Neural Data Processing | Anonymization |
---|---|---|---|---|---|---|---|---|
This Pipeline | Manual | Yes | Dykstra et al. [5] | 2D, 3D, Length-wise | Surface & Volume-Based | Yes | No | BIDS |
Lead DBS | Automatic | Yes | Yes | 2D, 3D | Subcortical | Possible | No | No |
Brainstorm | Automatic | Yes | Yes | 2D, 3D | Surface-Based | No? | Yes | No |
iELVis | Automatic/ Manual | Yes | Dykstra et al. or Yang et al. [5,21,66] | 2D, 3D | Surface-Based | Yes? | No | No |
LeGUI | Automatic | No | Hermes et al. [65] or Normal Vector Projection | No | Volume-Based | Yes | No | No |
Stolk/ Fieldtrip | Automatic | Yes | Dykstra et al. [5,25] | No | Surface & Volume-Based | Yes | Yes | No |
This table lists eight aspects of an electrode localization pipeline with six pipelines along the left side, including this pipeline.
Step 6: Creating images of the MRI with the electrode overlay, 30 minutes
To communicate the electrode locations relative to the MRI among the interested teams, we generate a.pdf (Adobe Acrobat) document (S2 Fig) which includes per-page, individual contact locations relative to the 3D brain and the MRI axes (coronal, sagittal, and horizontal sections). Further, we visualize the length of the depth electrode in a re-sliced coronal view along the long axis of the depth electrode. This step can be run with only 2D output (the electrode overlaid onto the MRI slice) as well, which does not require 3D surfaces (which are produced from FreeSurfer). This step uses a custom MATLAB script that we developed and which is included in the associated GitHub page (https://github.com/Center-For-Neurotechnology/Reconstruction-coreg-pipeline) and detailed in the online protocol [39].
Step 7: Multi-Modality Visualization Tool-lite (MMVT-lite), 10 minutes
The Multi-Modality Visualization Tool (MMVT) is an open-source python package developed by NP that converts the FreeSurfer reconstruction output into a Blender (blender.org) [67] file for three-dimensional visualization of electrode locations which can incorporate MRI, Freesurfer output, RAS mapping, and even evoked potentials into the visualization (https://mmvt.mgh.harvard.edu/) [30]. The original MMVT output has been highlighted in a number of publications and journal covers in the past few years [17,31,68,69]; however, the full MMVT installation requires a considerable number of dependencies for installation and has not been updated to use the latest version of blender.
As such, for the purposes of our protocol, we introduce MMVT-lite (https://github.com/pelednoam/mmvt_lite), which incorporates FreeSurfer commands that include parcellating the brain, mapping to different brain atlases, and the electrode labelling algorithm (ELA, (https://github.com/pelednoam/ieil)) [40] but does not output a blender file. MMVT-lite requires fewer dependencies than the original MMVT version, can be installed on any Mac or Linux machine (or Windows virtual machine) and uses ELA for automatic labelling of electrodes relative to different brain regions. NP developed ELA to identify the nearest brain region label by identifying the probability of overlap of an expanding area (cylinder) around each electrode with identified brain structure labels corresponding to grey matter (whether cortical or subcortical) using purely anatomical approaches. We map electrodes to regions in a given location which can be flexibly chosen within FreeSurfer, using the DKT 40 atlas in combination with a subcortical mapping [41,42,52,61]. As the ELA method involves arriving at probabilities that the contacts or the bipolar pair of electrodes are in that labelled brain region based on proximity to labelled nearby surfaces of the brain structures, a single contact can have multiple probabilities above zero if the contact is near different areas. This data is output in the form of a spreadsheet (.xls or.csv) with every brain region given a probability that each electrode contact is located in that region. Notably, parcellating the brain, which involves mapping brain structures onto the brain using common brain atlases, can also be independently done of MMVT-lite using FreeSurfer or SPM tools [41,42,46,60,70].
Step 8: iEEG BIDS formatting of channel labels and file formats, 30–40 minutes
Another feature we have incorporated into our pipeline involves converting the neural and electrode labelling into the intracranial electroencephalography Brain Imaging Data Structure (iEEG BIDS) format and folder structure including listing the electrodes based on iEEG BIDS formats [43]. As such, we included our modified code from the Bids Starter Kit code (https://bids-standard.github.io/bids-starter-kit/) which includes reformatting the neural, imaging, and electrode localization data into the Brain Vision format with the BIDS folder structure (https://bids-standard.github.io/bids-starter-kit/tutorials/ieeg.html).
Step 9: Extra measurements of electrode location relative to brain features, 20–30 minutes
The next step involves running custom MATLAB code developed by ACP that uses the FreeSurfer output, RAS file, and MMVT file output structure to perform different calculations regarding electrode location, label electrodes based on DKT or other selected brain atlas maps and produce output that matches the iEEG BIDS formatting. This also includes using a second approach for labelling each electrode based on the brain region location.
A second, novel, optional type of labelling that we developed for this pipeline for further electrode location validation, labelled Electrode Volume Labelling (EVL), involves mapping electrode locations relative to brain volumes circumscribed by the parcellated brain region maps. To do this, we export the FreeSurfer volume parcellations into 3D files (.stl files) using 3DSlicer (https://www.slicer.org/). The steps involve importing files from the FreeSurfer output folder and then saving the volumes per brain label: 1) load the brain.mgz and aparc.DKTatlas+aseg.mgz files from the SurferOutput folder; 2) save the output volumes of the parcellations: save (export) the.stl file to the selected folder. The resultant saved volumes are imported into MATLAB (MATLAB 2020b). Then the MATLAB function alphaShape is used to generate enclosing volumes per brain region label. The second MATLAB function, inshape, is then used to determine if an electrode was within the brain region volume (such as a cortical ribbon for a cortical label). Notably, for this step, we check that the T1 used in the original coregistration (Step 3) is in the same orientation and location as the FreeSurfer output.
For identification of electrode location relative to grey and white matter, we measure the orthogonal Euclidean distance from the center of each bipolar pair of electrodes to the nearest reconstructed vertex of the pial and white matter surfaces generated from FreeSurfer tools following colocalization [41,42,44–61]. Inter-contact distances between each contact is re-calculated using Euclidean measures. We classify electrode sites as in the grey matter, subcortical regions, white matter, and pial surface by identifying the colocalized location if the location is within the grey matter volume, the white matter volume, and the reconstructed subcortical volumes in the participants’ native space. The classification of the sites relative to the surfaces is done using the MATLAB inpolyhedron function [14,71]. In addition, we use the MATLAB functions alphaShape and inshape to identify electrodes on the pial surface but not within the cortex.
Step 10: Defacing the MRIs and CTs for deidentified data sharing, 10–15 minutes
For sharing data following FAIR data practices [72], it is essential that the data be de-identified to protect the identity of the patients. A number of algorithms can be used to de-face the scans [1,5,19,27,48,49,51,73]. However, as there can be errors in removing facial features from scans while allowing the scans to be useable for future reconstructions [74], we use the fieldtrip de-facer function for manual defacing of each scan [25,27].
Ethics statement
All imaged patients voluntarily participated after fully informed consent as monitored by the Partners Institutional Review Board covering Brigham and Women’s Hospital (BWH) and Massachusetts General Hospital (MGH). The full consent process is both verbal and written in that the initiation of consent starts with a conversation and the final consent is given through a written form. Participants were informed that participation would not alter their clinical treatment in any way, and that they could withdraw at any time without jeopardizing their clinical care.
Expected results
There are multiple outputs from this pipeline which can help answer multiple clinical and research questions (Fig 1, Table 1). We can find the location of the electrodes in a patient’s native brain space, thus allowing us to visualize the electrodes in the patient’s brain to be shared as.pdf documents in an easy-to-understand format (Figs 1, 2 and S1; Table 1). We also can use one of many brain atlases, which can be used to parcellate the brain into identified brain regions in FreeSurfer [41,42,44–61] followed by the electrode labelling algorithm (ELA; [40]) or the Electrode Volume Labelling (EVL). This allows us to algorithmically determine the locations of electrode contacts in the brain. This brain region localization alone has been useful for following seizure activity, planning stimulation, and localizing neural activity relative to cognitive processes [5,6,11–14,30–38]. Finally, this output data is easily converted into a universal format so that we can share our data with the greater scientific community (iEEG BIDS; [43]).
A primary design feature and requirement of this pipeline is to generate a shareable visual representation of the electrodes in the brain in a format which would be familiar to clinicians with a clear layout and at least three main views of the pre-operative MRI (coronal, sagittal, and horizontal; Figs 2B, S1 and S2; Table 1). The visualization is used to validate whether electrodes are implanted in the desired brain regions and to map neural epileptiform activity and the seizure onset zone (SOZ) to specified brain regions. This pipeline has been shared with clinical teams at Massachusetts General Hospital and Brigham and Women’s Hospital for nearly 15 years, which accounts for over 260 patients as of publication [5,6,11–14,30–38]. The end product is a shareable.pdf file (Adobe Acrobat; S1 File) that provides clinical and research teams with the appropriate electrode locations and labels, the three MRI views, a re-sliced coronal view along the length of a depth electrode shaft, and the electrode locations in the 3D brain per page of the.pdf. Grids and strips can also be displayed in the 3D brain for surface reconstructions (Fig 1). Importantly, the Step 6 output (Figs 1 and S1; Table 1) can be retrieved without running the 3D brain reconstructions (FreeSurfer, Methods Step 2) if only the MRI views are desired, highlighting the modularity of the pipeline and functionality for different use cases (S1 Fig).
To demonstrate the usefulness of the visualization and localization pipeline, we present a case where a patient had undergone pre-surgical evaluation with intracranial leads twice across many years but with slightly different electrode locations (Fig 2). In this case, we co-register two different post-operative CTs with different implants to a single T1-weighted MRI scan. We map the electrode locations illustrated relative to the ongoing neural activity recorded by the clinical neurophysiological system (Natus Medical Incorporated) (Fig 2A). Often presented in surgical planning conferences, identified seizure activity is compared with the electrode locations in the reconstructions for easy localization (Fig 2B and 2C). Mapping the electrode locations from the separate implants reveals if there was regional overlap of epileptiform activity in these two different intracranial investigations in the same participant. Even though the electrodes were different (sEEG vs ECoG strips) and in slightly different locations, the active sites identified as exhibiting epileptiform activity by the clinical team (including board-certified epileptologists) were in a similar area (the brain area near RAH1-2 in the second implant and RSUB5-6 in the first implant; Fig 2C). This information could be useful in discussing the epileptiform network as identified in the same participant.
An important step is to validate our co-registrations and visualization output. For this step, we confirm that the locations of the contacts, when plotted on the pre-op MRI, were in concordance with the locations identified using other pipelines. For N>100, clinical teams, led by epileptologists, neurophysiologists, and neurosurgeons, ran separate reconstruction pipelines for making visual representations of the electrodes in the brain, including using Brainstorm, iELVis, or LeadDBS [21,28,29]. Our visuals are always compared to these other reconstructions, and for all cases, we had parity in the location on the MRI scan. Additionally, we have output from the pipeline from 2 naïve users who had no experience with these types of protocols or processes (S2 Fig). Not only did their localization match with an experienced user (DJS), but output from the two users matched each other in these steps, with average absolute differences pre contact at 0.97±0.55 mm (across all three RAS axes and contacts) and an average root mean square error relative to the experienced user (DJS) of 0.96 (for naïve user 1) and 0.92 (for naïve user 2; S2 Fig). The output from their execution of the protocol demonstrates further the internal consistency and reproducibility of Steps 1–6 of this protocol.
Electrode localization relative to brain regions
There are a large number of ways to visualize electrode locations in the brain [1,19–30,75,76]. Some pipelines involve transforming the brain regions and electrode locations into a common map (MNI) and visualize activity in a single brain [1,28,29]. Other approaches involve projecting activity onto the surface or onto an inflated (flattened) cortical map [75,76]. Further, when transforming the patient brain into a common atlas, the regions of interest can be represented as voxels using a volumetric approach or as surfaces using the surface-based approach. Typically, surface-based approaches are used for labeling cortical areas because of the inherent variability across cortices, and volume-based approaches are better suited to more homogeneous subcortical labeling [60]. As such, we developed two separate pipelines, one mostly surface based and one purely volume based, for localizing electrodes to brain regions in commonly used atlases per electrode contact or pairs of electrodes (Figs 3 and 4). The two methods are 1) the Electrode Labelling Algorithm (ELA) using the Multi-Modal Visualization Tool (MMVT; Fig 3) also briefly described elsewhere [6,30,40] and 2) Electrode Volume Labeling (EVL; Fig 4), described here for the first time [39].
The ELA is a combined volume and surface approach which involves sampling the volume of space around electrode contacts to identify the nearest surface reconstructed from FreeSurfer, arriving at a probability that the electrode location is near that brain region surface (Fig 3). As such, for each contact, there can be multiple probability values above zero of that contact being in white matter or intersecting with the nearest grey matter surface (Fig 3). In our current approach, we take the highest probability value in the non-white matter labels to determine the brain region location for each contact (Fig 3), though further information is accessible in the ELA output [40]. Finally, after identifying the maximal grey matter probabilities per contact, we can then color code the contacts with the same labels in a common brain with the same atlas (e.g. with the DTK atlas; Fig 3F). We provide this code in our pipeline (https://github.com/Center-For-Neurotechnology/Reconstruction-coreg-pipeline) for use. ELA is currently incorporated into the MMVT-lite pipeline for processing the data but can be used separately [40]. Not only can we identify the brain region of each contact, but the pipeline also provides localizations as probabilities for better statistical rigor (and supplies the maximum likelihood value). This localization is now applied to almost all research projects performed by our lab as well as other researchers [6,11,13,14,18,31,34–36,38].
The second method developed de novo for this protocol, Electrode Volume Labeling (EVL), uses a purely volumetric approach (Fig 4). The steps involve exporting the volumetric aparc segmentations in FreeSurfer [42] using 3DSlicer [77] into.stl files which can be imported into MATLAB or Python for further mapping. Using MATLAB functions, we then classify electrode locations as within different volumes (including white matter volumes). This approach takes into account the thickness of various structures including grey matter. EVL is likely more relevant to depth electrodes than surface arrays (ECoG grids and strips), which is partly why we use both methods for identifying brain region locations per contact.
We have taken measures to validate our ELA and EVL output, though there is much more room for validation in this space. First, for ELA, we provided the 2D electrode localizations (as visualized with the.pdf output) of 20 patients relative to the MRI images to a neurologist and a psychiatrist with training in identifying brain regions with the brain labels. They confirmed the locations through a visual inspection of the localization. For N>200 patients, we have run ELA and found that the locations detected automatically match with the locations found in the MRI upon visual inspection. A limitation here is that these are not trained neuro-radiologists, though we consider these checks be a meaningful indication of accuracy. Further, in comparing EVL versus ELA, we find the methods for identifying brain region per contact are generally consistent between methods, with differences in identification of contacts which are fully in white matter versus grey matter which is may be expected with a volume versus surface based approach (N = 23).
Electrode characterization and measurements relative to anatomical structures
In parallel to electrode localization relative to brain regions, there are a number of different measures which could be relevant to further study, including localization relative to grey and white matter, contact size, and contact spacing. The organization of the FreeSurfer folders and RAS coordinates allows us to perform automatic calculations of these metrics using basic MATLAB functions without additional toolboxes. An essential step for identifying electrode locations relative to brain regions involves algorithmically and automatically labeling electrode contacts in the patient’s native space using purely anatomical landmarks. These measurements include locations relative to anatomical features such as the nearby grey matter, the nearest grey-white boundary, whether contacts are in white or grey matter, or the angles relative to the nearest cortical column. Some of the measures involve volumetric localization (Fig 4B). Other measures involve calculating the closest points (vertices) of the nearest imported brain surfaces (Fig 4C and 4D). As this approach allows across-patient comparisons automatically, we are able to calculate coverage of electrode contacts in grey matter, white matter, subcortical regions, and outside the brain for different depth trajectories (Fig 4E). A depth trajectory is where the distal tip of the sEEG electrode is aimed during implantation. Along this trajectory, we then calculate the number of contacts classified as in grey matter, white matter, subcortical regions, and outside brain using volumetric measures (see Methods and protocol [39]). Across one data set (N = 27), the location of electrodes in white matter versus cortical grey matter varies depending on the depth electrode trajectory (Fig 4E). This information may be useful for designing novel electrodes for localizing grey matter along common trajectories [78–80]. Further, this localization information and measures of electrode location is instrumental for examining how anatomical features alter neural responses to stimulation or for seizure localization (Fig 5) [6,14].
Use-case: Across-patient mapping, data standardization, and data sharing
Aside from the initial co-registration and electrode localization, the remaining steps in electrode localization, brain region labeling, and mapping are automatic, including measurements of electrode locations relative to neuroanatomical markers (Figs 4E and 5A). Therefore, across patients, we are able to color code contacts paired to brain regions across participants (Fig 5A) and summarize counts of contacts per brain region to identify coverage in a data set (Fig 5B), allowing for standardization across data sets.
Relevant to this point, as many journals and funding agencies now require the data be shared, we implement de-identification (defacing) and data reformatting into the iEEG BIDS format (see Methods and protocol [39]) following FAIR practices [72] to ensure we can safely share data following Open Science practices such as on the Data Archive BRAIN Initiative (DABI; https://dabi.loni.usc.edu [81]). At this archive, we share two imaging data sets with their various outputs from the pipeline (https://dabi.loni.usc.edu/dsi/R01NS062092). We have already shared a large intracranial data set using this pipeline (N = 52; [13,14,35]; https://dabi.loni.usc.edu/dsi/W4SNQ7HR49RL). Further electrode localization steps described in the protocol can also be included in the file output in a standardized and well-documented approach (see protocol [39]).
Use-case: Planning for neuromodulation / stimulation
In addition to its clinical uses, this pipeline is also valuable for researchers. For example, this pipeline has been used in understanding how stimulation alters brain activity as well as probe activity in different states such as during sleep and under general anesthesia (N = 82, [11,13,14,33–36,38]), where the reconstructed localizations were used to inform selecting stimulation sites. Localizing stimulation sites is important because a key facet of stimulation is understanding the distance between stimulation sites and the brain areas that are targets for stimulation [13,14]. As such, simple calculations of Euclidean distance are crucial for understanding how the brain responds to stimulation (Fig 5C). Using the surfaces, localizations, 3D output, and measurements (Fig 4D), we can precisely show where and how stimulation will impact a certain area based on the stimulating contact’s location and orientation relative to the grey-white matter boundary (Fig 5C). We found that stimulation responses vary depending on the stimulation location relative to grey and white matter [14]. We found that stimulation in white matter induced larger distant effects while stimulation closer to the boundary between grey and white matter induced larger local responses (Fig 5C) [14]. These metrics and relationships with stimulation may have implications for the use of neuromodulation for therapeutic use and understanding brain connectivity, which is dependent on this pipeline [14].
Use-case: Localizing and characterizing seizures
Another project set which has relied on this pipeline involves seizure electrophysiology (Fig 5D). Understanding the epileptogenic network and the role of different structures in seizure onset, spread, and termination is critical to understanding the underlying mechanisms of epilepsy [6,32]. One way to study seizures is to differentiate them based on their region of onset and the regions to which they spread. Understanding these pathways provides insights into seizure dynamics and how they may eventually be disrupted. For example, we have studied seizures recorded from 43 patients, and we used ELA to determine the brain region in which each electrode registering the seizure onset was most likely to be located in these patients. The seizures were classified based on (a) their electrographic pattern (e.g., low-voltage fast activity) at the onset and (b) the region (e.g., hippocampus, lateral temporal, etc.) from which the seizures originated. The phase-amplitude coupling (PAC) analysis showed that seizures originating from different regions might have more distinct PACs, and therefore the region of onset may distinctively impact the dynamics of seizure initiation. For instance, seizures with low-voltage fast activity at their onset have different PAC dynamics if they originate in the hippocampus versus lateral temporal regions (Fig 5D) [6].
Limitations
This methodology and pipeline has a number of inherent limitations which users should be aware of before using this overall approach. First, the manual step of electrode picking can present challenges such as poor contrast, an overwhelming imaging artifact from the electrodes, and low-resolution imaging. Therefore, it is not entirely surprising that the inconsistencies between electrode contact distances presented here can show up in the localizations. One approach to handle this discrepancy and to validate the localization would be to utilize algorithms to automatically detect the ‘bright spots’ of a postoperative CT scan and use this information to identify the centers of the electrode contacts, an approach utilized by some software packages [19,20,29]. We do not apply this approach here, but it could be done in future work. A second way to validate the electrode localizations would be to have multiple users localize the contacts, providing cross-user validation (which we have done previously, S2 Fig) or compare reconstructions across software packages, though this latter step could be outside the scope of the current study.
Secondly, because this is not a single software package and we make use of multiple software packages (e.g. FreeSurfer, Blender, MATLAB) as well as rely on the command-line for execution of the steps in the pipeline, there is no unifying graphical user interface for controlling all aspects of the pipeline. Therefore, some knowledge of how to navigate between directories through the command-line and how to safely manipulate their contents is required. We reference guides and give tips in our protocol to assuage such fears. Nevertheless, this may be off-putting to potential users who would ideally like to control everything from a single application (such as MATLAB), to potential users with no previous experience controlling an operating system from the command-line, or to potential users who would feel more comfortable controlling everything from a single graphical user interface (such as Lead-DBS or Brainstorm [28,29]).
Thirdly, because the methodology entails the execution of commands in the bash shell—bash being a Unix shell—and preprocessing of the images is handled by FreeSurfer—an application that is only available for Mac OS and Linux OS—not every user or organization will be able to immediately take advantage of this pipeline. While we have suggested running the pipeline through an Ubuntu virtual machine should a Windows user be interested in executing the pipeline, this may be off-putting to people with no prior experience installing or working within virtual machines.
Finally, one major limitation in any electrode localization approach is that the post-operative scans and localizations are only ‘snapshots’ of the electrode locations. Tissue shifts during and after implant could result in some amount of error. As such, these electrode localizations are best-guess approximations and any analyses and interpretations should keep this issue in consideration. We recommend using the most up-to-date post-operative imaging in order to avoid this problem. The associated brain shifts with ECoG electrodes are a further example of how localization error can propagate as the methodology, as described above, is prone to error or requires assumptions.
This pipeline is an attempt to demonstrate a longstanding collection of methodologies that take advantage of the strengths of different software packages generating all the output described above, with alternatives given along the way (S1 Fig). While each software piece may or may not be the perfect tool for each job, we find parts of the pipeline are sufficient for many use cases, and that there are alternatives in part or in whole to our pipeline. The comparison table (Table 2) and software pipeline with alternative options (S1 Fig) are quick guides on which of the popular software packages may best assist or even substitute for our pipeline methodology for a given feature.
Future directions
In the future, we anticipate the implementation and possible incorporation of new analysis pipelines into this overall pipeline. This includes white matter tract mapping using such approaches as TRACULA [82,83]. Since seizure disorders like epilepsy are understood to be disorders of the network [84], having more information about how these networks are constructed would be an invaluable tool. This can be used by research teams to answer questions regarding white matter connectivity and its relation to seizure disorders.
Another example of a future tool to add to this pipeline is the inclusion of additional subcortical atlases used in pipelines like LeadDBS [29]. This is a pipeline similar to ours, but where we focus on cortical areas, LeadDBS focuses on subcortical areas with an emphasis on the thalamus. The combination or integration of these two pipelines would also be a major advance for both clinicians and researchers, as both cortical and deep brain structures could be accurately localized and visualized.
While no pipeline like this will be perfect for all use cases, this protocol represents a reproducible pipeline followed by multiple users and applied in hundreds of instances for reconstructing a patient’s brain, visualizing implanted electrodes, algorithmically identifying the brain region for each implanted electrode, and organizing all this data into a sharable format. As this type of data becomes more common and widely used, we hope that each of these facets will become more robust, more user-friendly, and more clinically and scientifically impactful.
Associated content
Supporting information
Acknowledgments
We would like to thank Olivia Gawel, Devang Sehgal, Aniruddha Shekara, and Roshni Khatri for their incredible work testing the feasibility of this pipeline. We would also like to thank Rina Zelmann and Brian Coughlin for their feedback on this manuscript. Finally, we would like to thank most of all the patient-participants with whom we work for volunteering their time and energy to research during their clinical care.
Abbreviations
- Pre-op
pre-operative (before intracranial electrode implant
- Post-op
post-operative (after intracranial electrode implant
- DICOM
Digital Imaging and Communications in Medicine
- MPRAGE
magnetization-prepared 180 degrees radio-frequency pulses and rapid gradient-echo
- Ax
Axial
- NifTI
Neuroimaging Informatics Technology Initiative
- MRI
Magnetic Resonance Imaging
- CT
Computed Tomography
- RAS
Right Anterior Superior
- OS
Operating System (Windows, Mac, Linux
- MMVT
Multi-Modal Visualization Tool
- ECoG
electrocorticography
- sEEG
stereoelectroencephalography
- iEEG
intracranial electroencephalography
- Reconstruction
recreation of a brain’s surfaces and/or volumes from an MRI file
Data Availability
All relevant data for this study are publicly available in Data Archive BRAIN Initiative repository (https://doi.org/10.18120/gpgp-4r37).
Funding Statement
The authors report the following sources of funding: Support included Tiny Blue Dot foundation, https://www.tinybluedotfoundation.org/, to SSC, DJS, DR, and ACP. SSC was funded by NIH grants NINDS R01- NS062092, 1K24NS088568, R01-NS079533, R01-NS072023, and Massachusetts General Hospital Executive Committee on Research (MGH-ECOR). Some of this research was sponsored by the U.S. Army Research Office and Defense Advanced Research Projects Agency (DARPA), https://www.darpa.mil/, under Cooperative Agreement Number W911NF-14-2-0045 issued by ARO contracting office in support of DARPA’s SUBNETS Program. PS is supported by DoD (CDMRP FY21 Epilepsy Research Program W81XWH-22-1-0315). IB and AR were partially funded by the NIMH grant 1 R21 MH127009-01A1. The views and conclusions contained in this document are those of the authors and do not represent the official policies, either expressed or implied, of the funding sources. The funders had and will not have a role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
References
- 1.Mercier MR, Dubarry A-S, Tadel F, Avanzini P, Axmacher N, Cellier D, et al. Advances in human intracranial electroencephalography research, guidelines and good practices. NeuroImage. 2022; 119438. doi: 10.1016/j.neuroimage.2022.119438 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.McGonigal A, Bartolomei F, Régis J, Guye M, Gavaret M, Fonseca AT-D, et al. Stereoelectroencephalography in presurgical assessment of MRI-negative epilepsy. Brain. 2007;130: 3169–3183. doi: 10.1093/brain/awm218 [DOI] [PubMed] [Google Scholar]
- 3.Cuello Oderiz C, Von Ellenrieder N, Dubeau F, Eisenberg A, Gotman J, Hall J, et al. Association of Cortical Stimulation-Induced Seizure with Surgical Outcome in Patients with Focal Drug-Resistant Epilepsy. JAMA Neurology. 2019;76: 1070–1078. doi: 10.1001/jamaneurol.2019.1464 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4.Zweiphenning WJEM, von Ellenrieder N, Dubeau F, Martineau L, Minotti L, Hall JA, et al. Correcting for physiological ripples improves epileptic focus identification and outcome prediction. Epilepsia. 2022;63: 483–496. doi: 10.1111/epi.17145 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Dykstra AR, Chan AM, Quinn BT, Zepeda R, Keller CJ, Cormier J, et al. Individualized localization and cortical surface-based registration of intracranial electrodes. NeuroImage. 2012;59: 3563–3570. doi: 10.1016/j.neuroimage.2011.11.046 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Salami P, Peled N, Nadalin JK, Martinet L-E, Kramer MA, Lee JW, et al. Seizure onset location shapes dynamics of initiation. Clinical Neurophysiology. 2020. doi: 10.1016/j.clinph.2020.04.168 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Lee B, Zubair MN, Marquez YD, Lee DM, Kalayjian LA, Heck CN, et al. A Single-Center Experience with the NeuroPace RNS System: A Review of Techniques and Potential Problems. World Neurosurgery. 2015;84: 719–726. doi: 10.1016/j.wneu.2015.04.050 [DOI] [PubMed] [Google Scholar]
- 8.Acharya JN. Responsive neurostimulation for epilepsy: More than stimulation. Clinical Neurophysiology Practice. 2018;3: 120–121. doi: 10.1016/j.cnp.2018.06.002 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Zaher N, Urban A, Antony A, Plummer C, Bagic A, Richardson RM, et al. Ictal Onset Signatures Predict Favorable Outcomes of Laser Thermal Ablation for Mesial Temporal Lobe Epilepsy. Frontiers in Neurology. 2020;11: 1–8. doi: 10.3389/fneur.2020.595454 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.Kini LG, Bernabei JM, Mikhail F, Hadar P, Shah P, Khambhati AN, et al. Virtual resection predicts surgical outcome for drug-resistant epilepsy. Brain. 2019;142: 3892–3905. doi: 10.1093/brain/awz303 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Basu I, Yousefi A, Crocker B, Zelmann R, Paulk AC, Peled N, et al. Closed-loop enhancement and neural decoding of cognitive control in humans. Nature Biomedical Engineering. 2021. doi: 10.1038/s41551-021-00804-y [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Dykstra AR, Halgren E, Thesen T, Carlson CE, Doyle W, Madsen JR, et al. Widespread Brain Areas Engaged during a Classical Auditory Streaming Task Revealed by Intracranial EEG. Frontiers in Human Neuroscience. 2011;5: 1–14. doi: 10.3389/fnhum.2011.00074 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Crocker B, Ostrowski L, Williams ZM, Dougherty DD, Eskandar EN, Widge AS, et al. Local and Distant responses to single pulse electrical stimulation reflect different forms of connectivity. NeuroImage. 2021;237: 118094. doi: 10.1016/j.neuroimage.2021.118094 [DOI] [PubMed] [Google Scholar]
- 14.Paulk AC, Zelmann R, Crocker B, Widge AS, Dougherty DD, Eskandar EN, et al. Local and distant cortical responses to single pulse intracranial stimulation in the human brain are differentially modulated by specific stimulation parameters. Brain Stimulation. 2022;15: 491–508. doi: 10.1016/j.brs.2022.02.017 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Scangos KW, Makhoul GS, Sugrue LP, Chang EF, Krystal AD. State-dependent responses to intracranial brain stimulation in a patient with depression. Nature Medicine. 2021;27: 229–231. doi: 10.1038/s41591-020-01175-8 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Scangos KW, Khambhati AN, Daly PM, Makhoul GS, Sugrue LP, Zamanian H, et al. Closed-loop neuromodulation in an individual with treatment-resistant depression. Nature Medicine. 2021. doi: 10.1038/s41591-021-01480-w [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Adkinson JA, Tsolaki E, Sheth SA, Metzger BA, Robinson ME, Oswalt D, et al. Imaging versus electrographic connectivity in human mood-related fronto-temporal networks. Brain Stimulation. 2022;15: 554–565. doi: 10.1016/j.brs.2022.03.002 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Sheth SA, Bijanki KR, Metzger B, Allawala A, Pirtle V, Adkinson JA, et al. Deep Brain Stimulation for Depression Informed by Intracranial Recordings. Biological Psychiatry. 2021; 1–6. doi: 10.1016/j.biopsych.2021.11.007 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Davis TS, Caston RM, Philip B, Charlebois CM, Anderson DN, Weaver KE, et al. LeGUI: A Fast and Accurate Graphical User Interface for Automated Detection and Anatomical Localization of Intracranial Electrodes. Frontiers in Neuroscience. 2021;15: 769872. doi: 10.3389/fnins.2021.769872 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.LaPlante RA, Tang W, Peled N, Vallejo DI, Borzello M, Dougherty DD, et al. The interactive electrode localization utility: software for automatic sorting and labeling of intracranial subdural electrodes. International Journal of Computer Assisted Radiology and Surgery. 2017;12: 1829–1837. doi: 10.1007/s11548-016-1504-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Groppe DM, Bickel S, Dykstra AR, Wang X, Mégevand P, Mercier MR, et al. iELVis: An open source MATLAB toolbox for localizing and visualizing human intracranial electrode data. Journal of Neuroscience Methods. 2017;281: 40–48. doi: 10.1016/j.jneumeth.2017.01.022 [DOI] [PubMed] [Google Scholar]
- 22.Deman P, Bhattacharjee M, Tadel F, Job A-S, Rivière D, Cointepas Y, et al. IntrAnat Electrodes: A Free Database and Visualization Software for Intracranial Electroencephalographic Data Processed for Case and Group Studies. Frontiers in Neuroinformatics. 2018;12. doi: 10.3389/fninf.2018.00040 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Medina Villalon S, Paz R, Roehri N, Lagarde S, Pizzo F, Colombet B, et al. EpiTools, A software suite for presurgical brain mapping in epilepsy: Intracerebral EEG. Journal of Neuroscience Methods. 2018;303: 7–15. doi: 10.1016/j.jneumeth.2018.03.018 [DOI] [PubMed] [Google Scholar]
- 24.Blenkmann AO, Phillips HN, Princich JP, Rowe JB, Bekinschtein TA, Muravchik CH, et al. iElectrodes: A Comprehensive Open-Source Toolbox for Depth and Subdural Grid Electrode Localization. Frontiers in Neuroinformatics. 2017. doi: 10.3389/fninf.2017.00014 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Stolk A, Griffin S, van der Meij R, Dewar C, Saez I, Lin JJ, et al. Integrated analysis of anatomical and electrophysiological human intracranial data. Nature Protocols. 2018;13: 1699–1723. doi: 10.1038/s41596-018-0009-6 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Frauscher B, von Ellenrieder N, Zelmann R, Doležalová I, Minotti L, Olivier A, et al. Atlas of the normal intracranial electroencephalogram: neurophysiological awake activity in different cortical areas. Brain. 2018;141: 1130–1144. doi: 10.1093/brain/awy035 [DOI] [PubMed] [Google Scholar]
- 27.Oostenveld R, Fries P, Maris E, Schoffelen J-M. FieldTrip: Open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data. Computational intelligence and neuroscience. 2011;2011: 156869. doi: 10.1155/2011/156869 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Tadel F, Baillet S, Mosher JC, Pantazis D, Leahy RM. Brainstorm: A User-Friendly Application for MEG/EEG Analysis. Oostenveld R, editor. Computational Intelligence and Neuroscience. 2011;2011: 879716. doi: 10.1155/2011/879716 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 29.Horn A, Kühn AA. Lead-DBS: A toolbox for deep brain stimulation electrode localizations and visualizations. NeuroImage. 2015;107: 127–135. doi: 10.1016/j.neuroimage.2014.12.002 [DOI] [PubMed] [Google Scholar]
- 30.Felsenstein O, Peled N, Hahn E, Rockhill AP, Folsom L, Gholipour T, et al. Multi-Modal Neuroimaging Analysis and Visualization Tool (MMVT). arXiV. 2019;1: 1–29. [Google Scholar]
- 31.Provenza NR, Paulk AC, Peled N, Restrepo MI, Cash SS, Dougherty DD, et al. Decoding task engagement from distributed network electrophysiology in humans. Journal of Neural Engineering. 2019;16: 056015. doi: 10.1088/1741-2552/ab2c58 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Salami P, Borzello M, Kramer MA, Westover MB, Cash SS. Quantifying seizure termination patterns reveals limited pathways to seizure end. Neurobiology of Disease. 2022;165: 105645. doi: 10.1016/j.nbd.2022.105645 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 33.Krempp C, Paulk AC, Truccolo W, Cash SS, Zelmann R. Effect of Closed-Loop Direct Electrical Stimulation during Sleep Spindles in Humans. 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada. 2020; 3586–3589. doi: 10.1109/EMBC44109.2020.9175404 [DOI] [PubMed] [Google Scholar]
- 34.Zelmann R, Paulk A, Basu I, Sarma A, Yousefi A, Crocker B, et al. CLoSES: A platform for closed-loop intracranial stimulation in humans. NeuroImage. 2020;223: 117314. doi: 10.1016/j.neuroimage.2020.117314 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 35.Basu I, Robertson MM, Crocker B, Peled N, Farnes K, Vallejo-Lopez DI, et al. Consistent Linear and Non-Linear Responses to Electrical Brain Stimulation Across Individuals and Primate Species. Brain Stimulation. 2019;12: 877–892. doi: 10.1016/j.brs.2019.03.007 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Zelmann R, Paulk AC, Tian F, Balanza G, Peralta JD, Crocker B, et al. Differential Cortical Network Engagement During States of Un / Consciousness in Humans. Research Square. 2022; 1–28. doi: 10.21203/rs.3.rs-2006868/v2 [DOI] [Google Scholar]
- 37.Widge AS, Zorowitz S, Basu I, Paulk AC, Cash SS, Eskandar EN, et al. Deep brain stimulation of the internal capsule enhances human cognitive control and prefrontal cortex function. Nature Communications. 2019;10: 1–11. doi: 10.1038/s41467-019-09557-4 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 38.Tian F, Lewis LD, Zhou DW, Balanza GA, Paulk AC, Zelmann R, et al. Characterizing brain dynamics during ketamine-induced dissociation and subsequent interactions with propofol using human intracranial neurophysiology. Nature Communications. 2023;14: 1748. doi: 10.1038/s41467-023-37463-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 39.Soper D, Ross A, Reich D, Cash SS, Basu I, Peled N, et al. Modular Reconstruction and Co-registration of Imaging from Implanted ECoG and SEEG Electrodes. protocols.io. 2022. [Google Scholar]
- 40.Peled N, Gholipour T, Paulk AC, Felsenstein O, Dougherty DD, Widge AS, et al. Invasive Electrodes Identification and Labeling. GitHub Repository. 2017;https://gi. doi: 10.5281/zenodo.1078789 [DOI] [Google Scholar]
- 41.Fischl B, van der Kouwe A, Destrieux C, Halgren E, Ségonne F, Salat DH, et al. Automatically Parcellating the Human Cerebral Cortex. Cerebral Cortex. 2004;14: 11–22. doi: 10.1093/cercor/bhg087 [DOI] [PubMed] [Google Scholar]
- 42.Desikan RS, Ségonne F, Fischl B, Quinn BT, Dickerson BC, Blacker D, et al. An automated labeling system for subdividing the human cerebral cortex on MRI scans into gyral based regions of interest. NeuroImage. 2006;31: 968–980. doi: 10.1016/j.neuroimage.2006.01.021 [DOI] [PubMed] [Google Scholar]
- 43.Holdgraf C, Appelhoff S, Bickel S, Bouchard K, D’Ambrosio S, David O, et al. iEEG-BIDS, extending the Brain Imaging Data Structure specification to human intracranial electrophysiology. Scientific data. 2019;6: 102. doi: 10.1038/s41597-019-0105-7 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Segonne F, Dale AM, Busa E, Glessner M, Salat D, Hahn HK, et al. A hybrid approach to the skull stripping problem in MRI. NeuroImage. 2004;22: 1060–1075. doi: 10.1016/j.neuroimage.2004.03.032 [DOI] [PubMed] [Google Scholar]
- 45.Sled JG, Zijdenbos AP, Evans AC. A nonparametric method for automatic correction of intensity nonuniformity in MRI data. IEEE Trans Med Imaging. 1998;17: 87–97. doi: 10.1109/42.668698 [DOI] [PubMed] [Google Scholar]
- 46.Fischl B, Liu A, Dale AM. Automated manifold surgery: constructing geometrically accurate and topologically correct models of the human cerebral cortex. IEEE Medical Imaging. 2001;20: 70–80. doi: 10.1109/42.906426 [DOI] [PubMed] [Google Scholar]
- 47.Reuter M, Fischl B. Avoiding Asymmetry-Induced Bias in Longitudinal Image Processing. NeuroImage. 2011;57: 19–21. doi: 10.1016/j.neuroimage.2011.02.076 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48.Dale A, Fischl B, Sereno MI. Cortical Surface-Based Analysis: I. Segmentation and Surface Reconstruction. NeuroImage. 1999;9: 179–194. [DOI] [PubMed] [Google Scholar]
- 49.Fischl B, Sereno MI, Dale A. Cortical Surface-Based Analysis: II: Inflation, Flattening, and a Surface-Based Coordinate System. NeuroImage. 1999;9: 195–207. [DOI] [PubMed] [Google Scholar]
- 50.Segonne F, Pacheco J, Fischl B. Geometrically accurate topology-correction of cortical surfaces using nonseparating loops. IEEE Trans Med Imaging. 2007;26: 518–529. doi: 10.1109/TMI.2006.887364 [DOI] [PubMed] [Google Scholar]
- 51.Fischl B, Sereno MI, Tootell RBH, Dale AM. High-resolution intersubject averaging and a coordinate system for the cortical surface. Human Brain Mapping. 1999;8: 272–284. doi: [DOI] [PMC free article] [PubMed] [Google Scholar]
- 52.Reuter M, Rosas HD, Fischl B. Highly Accurate Inverse Consistent Registration: A Robust Approach. NeuroImage. 2010;53: 1181–1196. doi: 10.1016/j.neuroimage.2010.07.020 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 53.Fischl B, Dale AM. Measuring the thickness of the human cerebral cortex from magnetic resonance images. Proceedings of the National Academy of Sciences of the United States of America. 2000;97: 11050–11055. doi: 10.1073/pnas.200033797 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 54.Rosas HD, Liu AK, Hersch S, Glessner M, Ferrante RJ, Salat DH, et al. Regional and progressive thinning of the cortical ribbon in Huntington’s disease. Neurology. 2002;58: 695–701. doi: 10.1212/wnl.58.5.695 [DOI] [PubMed] [Google Scholar]
- 55.Kuperberg GR, Broome M, McGuire PK, David AS, Eddy M, Ozawa F, et al. Regionally localized thinning of the cerebral cortex in Schizophrenia. Archives of General Psychiatry. 2003;60: 878–888. doi: 10.1001/archpsyc.60.9.878 [DOI] [PubMed] [Google Scholar]
- 56.Jovicich J, Czanner S, Greve D, Haley E, van der Kouwe A, Gollub R, et al. Reliability in multi-site structural MRI studies: Effects of gradient non-linearity correction on phantom and human data. NeuroImage. 2006;30: 436–443. doi: 10.1016/j.neuroimage.2005.09.046 [DOI] [PubMed] [Google Scholar]
- 57.Han X, Jovicich J, Salat D, van der Kouwe A, Quinn B, Czanner S, et al. Reliability of MRI-derived measurements of human cerebral cortical thickness: The effects of field strength, scanner upgrade and manufacturer. NeuroImage. 2006;32: 180–194. doi: 10.1016/j.neuroimage.2006.02.051 [DOI] [PubMed] [Google Scholar]
- 58.Fischl B, Salat DH, van der Kouwe AJW, Makris N, Ségonne F, Quinn BT, et al. Sequence-independent segmentation of magnetic resonance images. NeuroImage. 2004;23: S69–S84. doi: 10.1016/j.neuroimage.2004.07.016 [DOI] [PubMed] [Google Scholar]
- 59.Salat D, Buckner RL, Snyder AZ, Greve DN, Desikan RS, Busa E, et al. Thinning of the cerebral cortex in aging. Cerebral Cortex. 2004;14: 721–730. doi: 10.1093/cercor/bhh032 [DOI] [PubMed] [Google Scholar]
- 60.Fischl B, Salat DH, Busa E, Albert M, Dieterich M, Haselgrove C, et al. Whole brain segmentation: automated labeling of neuroanatomical structures in the human brain. Neuron. 2002;33: 341–355. doi: 10.1016/s0896-6273(02)00569-x [DOI] [PubMed] [Google Scholar]
- 61.Reuter M, Schmansky NJ, Rosas HD, Fischl B. Within-Subject Template Estimation for Unbiased Longitudinal Image Analysis. NeuroImage. 2012;61: 1402–1418. doi: 10.1016/j.neuroimage.2012.02.084 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 62.Lancaster JL, Cykowski MD, McKay DR, Kochunov PV, Fox PT, Rogers W, et al. Anatomical global spatial normalization. Neuroinformatics. 2010;8: 171–182. doi: 10.1007/s12021-010-9074-x [DOI] [PMC free article] [PubMed] [Google Scholar]
- 63.Lancaster JL, McKay DR, Cykowski MD, Martinez MJ, Tan X, Valaparla S, et al. Automated analysis of fundamental features of brain structures. Neuroinformatics. 2011;9: 371–380. doi: 10.1007/s12021-011-9108-z [DOI] [PMC free article] [PubMed] [Google Scholar]
- 64.Lancaster JL, Laird AR, Eickhoff SB, Martinez MJ, Fox PM, Fox PT. Automated regional behavioral analysis for human brain images. Frontiers in Neuroinformatics. 2012;6: 1–12. doi: 10.3389/fninf.2012.00023 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 65.Hermes D, Miller KJ, Noordmans HJ, Vansteensel MJ, Ramsey NF. Automated electrocorticographic electrode localization on individually rendered brain surfaces. Journal of Neuroscience Methods. 2010;185: 293–298. doi: 10.1016/j.jneumeth.2009.10.005 [DOI] [PubMed] [Google Scholar]
- 66.Yang AI, Wang X, Doyle WK, Halgren E, Carlson C, Belcher TL, et al. Localization of dense intracranial electrode arrays using magnetic resonance imaging. NeuroImage. 2012;63: 157–165. doi: 10.1016/j.neuroimage.2012.06.039 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 67.Community BO. Blender—a 3D modelling and rendering package. Stichting Blender Foundation, Amsterdam: Blender Foundation; 2018. Available: http://www.blender.org. [Google Scholar]
- 68.Widge AS, Ellard KK, Paulk AC, Basu I, Yousefi A, Zorowitz S, et al. Treating refractory mental illness with closed-loop brain stimulation: Progress towards a patient-specific transdiagnostic approach. Experimental Neurology. 2017;287: 461–472. doi: 10.1016/j.expneurol.2016.07.021 [DOI] [PubMed] [Google Scholar]
- 69.Provenza NR, Sheth SA, Rijn EMD, Mathura RK, Ding Y, Vogt GS, et al. Long-term ecological assessment of intracranial electrophysiology synchronized to behavioral markers in obsessive-compulsive disorder. Nature Medicine. 2021. doi: 10.1038/s41591-021-01550-z [DOI] [PMC free article] [PubMed] [Google Scholar]
- 70.Tzourio-Mazoyer N, Landeau B, Papathanassiou D, Crivello F, Etard O, Delcroix N, et al. Automated anatomical labeling of activations in SPM using a macroscopic anatomical parcellation of the MNI MRI single-subject brain. Neuroimage. 2002;15: 273–289. doi: 10.1006/nimg.2001.0978 [DOI] [PubMed] [Google Scholar]
- 71.Sven. inpolyhedron—are points inside a triangulated volume? 2022. Available: https://www.mathworks.com/matlabcentral/fileexchange/37856-inpolyhedron-are-points-inside-a-triangulated-volume. [Google Scholar]
- 72.Wilkinson MD, Dumontier M, Aalbersberg IjJ, Appleton G, Axton M, Baak A, et al. The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data. 2016;3: 160018. doi: 10.1038/sdata.2016.18 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 73.Vinding MC, Oostenveld R. Sharing individualised template MRI data for MEG source reconstruction: A solution for open data while keeping subject confidentiality. NeuroImage. 2022;254: 119165. doi: 10.1016/j.neuroimage.2022.119165 [DOI] [PubMed] [Google Scholar]
- 74.Theyers AE, Zamyadi M, O’Reilly M, Bartha R, Symons S, MacQueen GM, et al. Multisite Comparison of MRI Defacing Software Across Multiple Cohorts. Frontiers in Psychiatry. 2021;12. doi: 10.3389/fpsyt.2021.617997 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 75.Kleen JK, Speidel BA, Baud MO, Rao VR, Ammanuel SG, Hamilton LS, et al. Accuracy of omni-planar and surface casting of epileptiform activity for intracranial seizure localization. Epilepsia. 2021;62: 947–959. doi: 10.1111/epi.16841 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 76.Kwon H, Kronemer SI, Christison-Lagay KL, Khalaf A, Li J, Ding JZ, et al. Early Cortical Signals in Visual Stimulus Detection. NeuroImage. 2021;244: 118608. doi: 10.1016/j.neuroimage.2021.118608 [DOI] [PubMed] [Google Scholar]
- 77.Fedorov A, Beichel R, Kalpathy-Cramer J, Finet J, Fillion-Robin J-C, Pujol S, et al. 3D Slicer as an image computing platform for the Quantitative Imaging Network. Magnetic resonance imaging. 2012;30: 1323–1341. doi: 10.1016/j.mri.2012.05.001 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 78.Desai SA, Gutekunst C-A, Potter SM, Gross RE. Deep brain stimulation macroelectrodes compared to multiple microelectrodes in rat hippocampus. Frontiers in Neuroengineering. 2014;7: 1–8. doi: 10.3389/fneng.2014.00016 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 79.Maggio F, Pasciuto T, Paffi A, Apollonio F, Parazzini M, Ravazzani P, et al. Micro vs macro electrode DBS stimulation: A dosimetric study. 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, EMBC’10. 2010; 2057–2060. doi: 10.1109/IEMBS.2010.5626487 [DOI] [PubMed] [Google Scholar]
- 80.Martínez CGB, Niediek J, Mormann F, Andrzejak RG. Seizure Onset Zone Lateralization Using a Non-linear Analysis of Micro vs. Macro Electroencephalographic Recordings During Seizure-Free Stages of the Sleep-Wake Cycle From Epilepsy Patients. Frontiers in Neurology. 2020;11: 1–17. doi: 10.3389/fneur.2020.553885 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 81.Duncan D, Garner R, Brinkerhoff S, Walker HC, Pouratian N, Toga AW. Data Archive for the BRAIN Initiative (DABI). Scientific Data. 2023;10: 83. doi: 10.1038/s41597-023-01972-z [DOI] [PMC free article] [PubMed] [Google Scholar]
- 82.Yendiki A, Panneck P, Srinivasan P, Stevens A, Zöllei L, Augustinack J, et al. Automated Probabilistic Reconstruction of White-Matter Pathways in Health and Disease Using an Atlas of the Underlying Anatomy. Frontiers in Neuroinformatics. 2011;5. doi: 10.3389/fninf.2011.00023 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 83.Maffei C, Lee C, Planich M, Ramprasad M, Ravi N, Trainor D, et al. Using diffusion MRI data acquired with ultra-high gradient strength to improve tractography in routine-quality data. NeuroImage. 2021;245: 118706. doi: 10.1016/j.neuroimage.2021.118706 [DOI] [PMC free article] [PubMed] [Google Scholar]
- 84.Kramer MA, Cash SS. Epilepsy as a Disorder of Cortical Network Organization. Neuroscientist. 2012;18: 360–372. doi: 10.1177/1073858411422754 [DOI] [PMC free article] [PubMed] [Google Scholar]