Skip to main content
NeuroImage : Clinical logoLink to NeuroImage : Clinical
. 2018 Aug 1;20:398–406. doi: 10.1016/j.nicl.2018.07.026

Enhanced co-registration methods to improve intracranial electrode contact localization

Walter A Hinds a, Amrit Misra b, Michael R Sperling c, Ashwini Sharan d, Joseph I Tracy e, Karen A Moxon f,
PMCID: PMC6095944  PMID: 30128278

Abstract

Background

Electrode contact locations are important when planning tailored brain surgeries to identify pathological tissue targeted for resection and conversely avoid eloquent tissue. Current methods employ trained experts to use neuroimaging scans that are manually co-registered and localize contacts within ~2 mm. Yet, the state of the art is limited by either the expertise needed for each type of intracranial electrode or the inter-modality co-registration which increases error, reducing accuracy. Patients often have a variety of strips, grids and depths implanted; therefore, it is cumbersome and time-consuming to apply separate localization methods for each type of electrode, requiring expertise across different approaches.

New method

To overcome these limitations, a computational method was developed by separately registering an implant magnetic resonance image (MRI) and implant computed tomography image (CT) to the pre-implant MRI, then calculating an iterative closest point transformation using the contact locations extracted from the signal voids as ground truth.

Results

The implant MRI is robustly co-registered to the pre-implant MRI with a boundary-based registration algorithm. By extracting and utilizing ‘signal voids’ (the metal induced artifacts from the implant MRI) as electrode fiducials, the novel method is an all-in-one approach for all types of intracranial electrodes while eliminating inter-modality co-registration errors.

Comparison with existing methods

The distance between each electrode centroid and the brain's surface was measured, for the proposed method as well as the state of the art method using two available software packages, SPM 12 and FSL 4.1. The method presented here achieves the smallest distances to the brain's surface for all strip and grid type electrodes, i.e. contacts designed to rest directly on the brain surface.

Conclusion

We use one of the largest reported sample sizes in localization studies to validate this novel method for localizing different kinds of intracranial electrodes including grids, strips and depth electrodes.

Keywords: MRI, ECoG, Epilepsy, Localization, Grid, Strip, Depth

Highlights

  • Co-registration between intramodal pre- and implant images allows for accurate localization of all subdural electrode types.

  • Iterative closest point (ICP) assisted grid electrode localization is comparable to existing implant MRI based methods.

  • ICP is a novel, semi-automated method to localize grid, strip and depth electrodes with state-of-the-art accuracy

1. Introduction

Intracranial electroencephalography (iEEG) is an important tool for analyzing brain activity because it directly records electrical signals from targeted brain structures. However, there is a need for an improvement in electrode localization to better identify pathological tissue (Smith, 2005; Stefan et al., 1996), spare eloquent cortex (Carmichael et al., 2008; Rodionov et al., 2013), enhance the understanding of neurological disorders on brain function (Misra et al., 2014; Lachaux et al., 2004; Lachaux et al., 2007) and/or improve comparison of data (Carmichael et al., 2010; Hermes et al., 2012; Wang et al., 2012) across populations (Guenot et al., 2001; Dykstra et al., 2012; Klein and Tourville, 2012).

Methods to improve electrode localization accuracy have been developed (Nelles et al., 2004; Pieters, 2013), yet, they are either limited by the type of intracranial electrode (Morris et al., 2004; Yang et al., 2012) or rely on inter-modality registration which introduces error, reducing accuracy (Morris et al., 2004; Hermes et al., 2010; Taimouri et al., 2013; Tao et al., 2009). The most common approach is to co-register a pre-implant magnetic resonance image (MRI) with a computed tomography image (CT) after the electrodes have been implanted (Jenkinson and Smith, 2001; Jenkinson et al., 2002; Wells et al., 1996; Pluim et al., 2003; Collignon et al., 1995) (Fig. 1).

Fig. 1.

Fig. 1

Intracranial electrode implant images. A. Cartoons with recording channel labels are used in operating rooms and after surgeries for localization reference (~5 mm). B. Intraoperative photographs from digital cameras can be used to localize some grid electrodes visible through craniotomies, but these contacts are also susceptible to significant shifting (~2.5 mm). C. (left) Implant computed tomography (CT) can be co-registered with (right) pre-implant magnetic resonance image (MRI) using software implementations of a mutual information (MI) based algorithm; however, the algorithm is not ideal for two different modalities (CT and MRI), as well as being vulnerable to the high contrast noise in the implant CT due to the metal artifacts (~2.0 mm). A 3D rendering (bottom). (~Accuracies in parenthesis are estimated from literature cited in this study and general consensus among experts.)

For grid type surface electrodes, intraoperative photographs of the exposed craniotomy can be used to localize visible contacts (Pieters, 2013; Van Veelen and Debets, 1990), however, implantations performed through minimally sized burr-holes prevent using this approach, as no contacts are visible. Importantly, it has been shown that electrode grids can shift up to 7 mm post-craniotomy/electrode implantation (Laviolette et al., 2011; Pallavaram et al., 2010) and the photographic methods suffer from additional 1.2 mm (±0.8 SD) inter-rater variability (Wellmer et al., 2002).

An automated method using intra-modal registration (MRI-MRI) was shown to be more accurate than previous approaches, but it is limited to grid type electrodes (Yang et al., 2012). Patients often have a variety of strips, grids and depths implanted; thus it is additional work to apply multiple localization methods for each type of electrode. This paper describes a streamlined, computational method to accurately identify all types of intracranial electrode locations and overcome the inherent inter-modality errors. In brief, an implant MRI and implant CT were separately registered to a pre-implant MRI. Electrode localizations were estimated from the artifacts in the implant MRI and implant CT then subsequently co-registered to the pre-implant anatomical space (pre-implant MRI) to yield two similar yet distinct sets of artifact points, A (x,y,z), in 3D space that represent 1) the highly precise CT location (ACT) and 2) the anatomically grounded MRI location (AMRI). Finally, the two point sets were automatically fused with a transform, TICP, calculated from an iterative closest point (ICP) matching algorithm to produce corrected electrodes localized within the anatomically correct pre-implant MRI space devoid of artifacts. (Fig. 2).

Fig. 2.

Fig. 2

Flow-diagram for three image localization method. The pipeline uses FreeSurfer to process the raw images and segment the anatomical information from the pre-implant MRI. Next, the electrode artifacts, ACT and AMRI, from the two post-implant images are imported into MATLAB for labeling and further processing. The three-dimensional point sets from the two scans' metal-artifact signals are combined with an iterative-closest point matching algorithm which calculates the ideal transformation TICP. This transform allows the centroids from the post-implant CT scan to be reconciled with the post-implant MRI space that is optimally aligned to the pre-implant MRI. Note: Dotted arrows are steps that compute a transformation. The dashed line box indicates the only step requiring a simple manual intervention, which is unrelated to the automated localization and rather a clinically dependent step to be used for matching recording channels to corresponding electrode contacts.

2. Materials and methods

2.1. Data acquisition

Thirty patients (37.5 ± 13.2 years, 18 males and 12 females; 2170 strip, 538 depth, and 364 grid electrodes) with clinical cases requiring the implantation of intracranial electrodes were examined in this retrospective study (Table 1), with implant locations determined by clinical necessity. The patient population came from Thomas Jefferson Hospital over the span of three years, with all cases related to intractable epilepsy. Informed consent was obtained and privacy rights were observed in accordance with IRB guidelines. The approach uses three brain images: one before any surgical procedure, the ‘pre-implant MRI’, and two immediately after the electrodes are implanted, an ‘implant MRI’ and an ‘implant CT’. The pre-implant scan was a structural non-contrast, T1-weighted image acquired using a 3 T scanner (Siemens*), with voxel resolution of at most 1.0 mm3 and field of view (FOV) ≥220 mm (Table S1). Immediately after the electrode implantation the implant CT was acquired with voxel resolution of at least 1.0 mm3 and field of view FOV ≥256 mm (GE Medical Systems*) (Table S2). The third image, an implant MRI scan was obtained with the same parameters and on the same acquisition machine as the pre-implant MRI (Table S3).

Table 1.

Patient demographics and electrode population. A total of thirty (Greve and Fischl, 2009) patients with surgically implanted subdural electrodes were retrospectively studied. This study examined a variety of cases that included strip, depth and grid type electrodes.

Patient Age/sex STRIP DEPTH GRID
TJ018 20/M 128 32
TJ020 34/F 48 36 24
TJ021 52/F 48 18 24
TJ024 44/F 36 24
TJ030 45/M 64 36
TJ031 15/M 56 24
TJ033 53/M 56 18 24
TJ035 36/M 152 36
TJ038 48/F 128 32
TJ040 35/M 56 24
TJ044 20/F 86
TJ045 31/M 72 16
TJ047 50/M 128
TJ049 44/F 72 32
TJ050 28/M 16 18
TJ052 38/M 48 36
TJ055 56/M 40 24 36
TJ056 47/M 124 32
TJ059 27/M 112
TJ060 20/F 40 26
TJ061 55/M 96 20
TJ064 37/F 64 6
TJ065 57/M 48 12
TJ071 48/M 96 24 24
TJ074 48/M 180
TJ075 30/M 80 24 64
TJ078 19/F 64 48
TJ080 24/F 104 48
TJ081 25/F 112 24 64
TJ082 57/F 72 16 20
N = 30 37.5 ± 13.2 2170 538 364
18 M/12F

The implant CT slices (DICOM) were converted to standard 3D volume format nifti. The pre-implant MRI volume was processed for surface anatomy using a fully automated protocol, ‘recon_all’, in FreeSurfer (http://surfer.nmr.mgh.harvard.edu/). The implant MRI volume was normalized (T1 format, white matter intensities scaled to 110 a.u., slice dimensions conformed to 1-mm3 and n = 256 isotropic slices) using a truncated ‘recon_all’ procedure which also stripped the skull. (Fig. 2: Raw Images (first row)). NOTE – FreeSurfer or other similar programs could be used for these steps. All images were saved in a standard nifti format (nifti.nimh.nih.gov).

The depth electrodes had inter-electrode distances of 10 mm and contact diameters between 2.0 and 2.5 mm. For grid and strip electrodes, inter-electrode distances were 10 mm and the exposed contact diameter was 4 mm. The thickness of the grid and strip contacts was <1 mm. Electrodes used in this study were manufactured by either Adtech Medical Instruments (Racine, WI) or Integra Epilepsy (Plainsboro, NJ).

2.2. Electrode localization

A boundary-based registration (BBR) method was used to co-register the implant MRI with the pre-implant MRI (Greve and Fischl, 2009). This approach leverages the white/grey matter gradient and the algorithm is robust to signal void artifacts from implanted electrodes, ventricular volume swelling, cerebral edema, and parenchymal shift. The output of this co-registration is a rigid (6 DOF) transformation of the implant MRI volume to pre-implant MRI space, TBBR.

Next, using FLIRT from FSL 4.1 (Jenkinson and Smith, 2001; Jenkinson et al., 2002) and ‘Co-Register’ from SPM 12 (Wells et al., 1996; Pluim et al., 2003; Collignon et al., 1995), a mutual information based cost function (Wells et al., 1996; Maes et al., 1997) was implemented with the default settings to co-register the CT to the pre-implant MRI. This approach has been shown to have the best results when compared to correlation ratio (CR) (van Rooijen et al., 2013a). The output of this co-registration is a rigid (6 DOF) or affine (12 DOF), initial transformation of the implant CT volume into pre-implant MRI space, TMI. Non-rigid transformation was used to account for the tissue deformation (Studholme et al., 2001) between the pre-implant and implant images. Non-rigid co-registration has been used in other electrode localization studies to register the pre-implant MRI image with the post-implant CT and no additional errors were reported (Hunter et al., 2005; van Rooijen et al., 2013b; Wu et al., 2012). However, the user can also apply a rigid 6 DOF, which will produce fewer free parameters that could alter the co-registration (Table 2).

Table 2.

Variables and descriptions. The three types of images are processed and transformed to yield several variables and metrics, defined here in brief for easy reference. Please see main text for full descriptions. n = (50–150); the number of implanted electrodes.

Variable Description [dimension size]
TMI [4 × 4] Transformation with mutual information (MI) of implant CT to pre-implant MRI (either FSL 4.1 or SPM 12) (see Fig. 2)
TBBR [4 × 4] Transformation with boundary-based registration (BBR) of implant MRI to pre-implant MRI (FreeSurfer) (see Fig. 2)
TICP [4 × 4] Transformation with iterative closest point (ICP) matching algorithm of ACT to AMRI. (MATLAB) (see Fig. 2)
ACT [1000's × 3] Artifacts extracted from the implant CT that was co-registered to pre-implant MRI with mutual information (MI); software was either FSL 4.1 or SPM 12 (see Fig. 2, Fig. 4, Yellow dots)
AMRI [1000's × 3] Artifacts extracted from the implant MRI that was co-registered to pre-implant MRI with boundary-based registration (BBR); software was FreeSurfer 5.3 (see Fig. 2, Fig. 4, Blue dots)
AICP [1000's × 3] Artifacts from the ACT set after transformed with the TICP. (see Fig. 4, Red dots)
ECT [n × 3] Electrode centroids automatically detected in the ACT, from either FSL 4.1 or SPM 12 (see Fig. 4, Yellow circle)
EMRI [n × 3] Electrode centroids automatically detected in the AMRI, from ICP transfomation (see Fig. 4, Pink circle)
PCT [n × 1] Proximity to the closest smooth pial surface vertex for ECT (Euclidean distance) (see Fig. 4)
PMRI [n × 1] Proximity to the closest smooth pial surface vertex for EMRI (Euclidean distance) (see Fig. 4)
DMethod [n × 1] Distances (Euclidean) between methods; Pairwise comparisons of EMRI(ICP), ECT(FSL), and ECT(SPM); (see Fig. 4)

To identify electrodes in the implant MRI a mask from the pre-implant MRI was used to separate potential electrode contacts from physiological signal voids, the surface anatomy and tissue segmentation obtained from the pre-implant MRI. Using FreeSurfer, the pre-implant MRI was transformed into a binary mask where the zeros represent anatomical voids such as ventricles and empty space and ones represent parenchymal tissue. Due to significant brain shift after implantation, anatomical areas proximal to the ventricles were also masked to zero, including the choroid plexus, cerebellum and brainstem. The mask was applied to the co-registered implant MRI to leave behind only those signal voids made by the electrodes (Fig. 3). In this masked implant MRI, the electrode artifacts produced a cloud of 3D points, AMRI, that were co-registered in the pre-implant MRI brain space (blue dots, Fig. 2, Fig. 4).

Fig. 3.

Fig. 3

Post-MRI signal void extraction. 1a. The metal artifacts from the electrodes appear as black signal voids in the implant MRI. 2a. A brain-boundary registration is able to use the white/grey matter boundary (green line) to align the pre-implant and post-implant MRI. 1b. The pre-implant MRI is anatomically segmented based on a probability atlas. 2b. A parenchymal mask is created from the segmented anatomy, which excludes signal void areas such as ventricles. 3. When the mask is applied to the co-registered, post-implant MRI, the signal voids yield a set of voxels corresponding to the metal electrodes, AMRI.

Fig. 4.

Fig. 4

Validation and measuring electrode distances. (Left) All the pertinent information for electrode localization. Here, the yellow, blue, and red point clouds represent the metal artifact voxels extracted from the co-registered implant images. The yellow dots are ACT and blue dots are AMRI; the red dots are AICP = ACT*TICP. The grey transparent object is the 3D rendered brain surface computed from the pre-implant MRI. (Right) Zoomed in to illustrate the validation metrics. The Euclidian distances, PCT and PMRI, between the electrode centroids, E(CT,MRI), (yellow and pink circle) and the nearest vertex (black dot) on the smoothed pial surface was measured for every electrode. Additionally, the Euclidian distance, DMethod, between electrode centroids, E(CT,MRI), (yellow and pink circle) was calculated pairwise for each comparison of methods. NOTE: “CT” variables are calculated with both imaging software, FSL4.1 and SPM12, while “MRI” variables represent results of the novel ICP method presented here.

To identify electrodes in the implant CT, the metal artifacts made by the contacts were extracted by binarizing the maximum intensity voxels. The extracted voxels form a cloud of 3D points, ACT, that is co-registered in the pre-implant MRI brain space. When manually identifying electrode centroids from each cloud, there can be inter-observer, and even intra-observer discrepancies (van Rooijen et al., 2013a; Hebb and Miller, 2010). Here, we developed an algorithm to do this rapidly and accurately with minimal human intervention for the implant CT. The suite of analysis code used in this study along with the localization GUI will be available for download under an open GNU license @ https://github.com/Neurorobtics/ACOREL.

The centroid, E, of each cloud of electrode voxels was identified using a brute-force, density-based scanning algorithm (Ester et al., 1996). A human technician is sometimes required to correct instances where the centroid is misclassified due to overlapping electrodes (<5%). Additionally, this is the most convenient stage to assign recording channel names to each contact centroid (Fig. S1). In the co-registered, post-implant CT volume, the set of centroids of the metal artifacts is another set of points, ECT, in the pre-implant native space (yellow circles, Fig. 4).

The point-sets (ACT and AMR) are then realigned using an implementation of the iterative-closest point (ICP) algorithm (Besl and McKay, 1992; Kjer and Wilm, 2010). This algorithm seeks to align the 3D points from the implant CT electrode artifacts, ACT, with the 3D points from the implant MRI electrode artifacts, AMRI, using a minimization of least squares of the distances between closest points. In brief, this algorithm computes the rigid transformation, TICP, that maps ACT onto AMRI, correcting the likely locations of electrodes in the MRI native space using the more accurate location in the CT native space creating a final set of corrected electrode coordinates, EMRI.

2.3. Validation metrics

To validate the approach for strips and grids, the Euclidian distance between the electrode centroids and the nearest location on the pial surface was computed. Since grid and strip electrodes are designed to lie directly on the brain surface, the method should result in a relatively short distance to the surface when compared with other accurate approaches (Crum et al., 2003). The proximity of ECT to the surface is referred to as PCT. For the two most commonly used methods of co-registration used in electrode localization, FSL4.1 and SPM12, the PCT was calculated. The proximities of the electrode location EMRI to the surface is called PMRI (Fig. 4). The population of proximities was compared using a paired-sample, non-parametric Wilcox Signed-Rank test (Connover and Iman, 1981). The non-parametric effect sizes are reported as the average of 3 separate “effect sizes” for the non-parametric Wilcox signed-rank test. 1. Rank Bi-Serial Correlation (Pallant, 2007; Field, 2016), 2. Simple Difference (Kerby, 2014), 3. Common Language Effect Size (McGraw and Wong, 1992).

To assess accuracy of all approaches for grids, Euclidian distances between the final surface locations and those predicted from the Yang method (Yang et al., 2012) were compared after applying a surface normal projection (Hermes et al., 2010; Taimouri et al., 2013) to the ICP electrode coordinates, EMRI. The Euclidean distance between the electrode localization using FSL 4.1, SPM 12 or ICP and that of Yang et al. (2012) were compared using the median difference.

To understand the significance of the ICP approach and the actual difference it makes in localization, the median distances between all electrode localization from two different approaches (Methods pairwise: FSL4.1-ICP, SPM12-FSL4.1 and ICP-SPM12) were compared using between group comparisons, separately for grids, strips and depths, for each patient. Data were non-uniformly distributed therefore results are reported as medians ± inter-quartile range. ECT is determined from the standard approach (Hermes et al., 2010) using one of two possible mutual information softwares (FSL 4.1 and SPM 12). The distance (DMeth) between the standard approach centroids, ECT, and the transformed centroids, EMRI, is the Euclidian distance between the two points in three dimensional space, before any surface projection (Fig. 4). We performed a one-sided signtest on the DMeth for each patient, with the medians compared to a typical 2.5 mm electrode radius, i.e. the clinical standard for ECoG accuracy. The ratio of patients who ‘fail’ the signtest by having DMeth > 2.5 mm is used to calculate an alternate common language effect size for clinical relevance.

3. Results

3.1. More proximal localization to surface of grids and strips

For strips and grids, the distance between the electrode centroids and the closest surface vertex should be theoretically less than the thickness of the electrode contact (<1 mm) because these electrode contacts are designed to rest directly on the brain's surface. For grid electrode cases (N = 11 patients), the novel method, ICP, yielded electrode centroids that were closer to the surface (PMRI = 4.3 ± 3.2 mm) than either FSL4.1 (PCT = 5.4 ± 3.8 mm) or SPM12 (PCT = 5.4 ± 3.8 mm, Wilcox Signed-Rank, p = .019 and p = .001, respectively, Fig. 5A),with effects sizes r = 0.5 and r = 0.9. Similarly, for strip electrode cases (N = 30 patients), the ICP method (PMRI = 1.9 ± 0.7 mm) yielded electrode centroids localized closer to the surface than the FSL4.1 method (PCT = 2.4 ± 1.4 mm, p = .002, r = 0.45). However, when comparing the ICP approach to that of SPM12 (PCT = 2.0 ± 1.0 mm), the distances between the electrode location and the brain's surface were not statistically different (p = .171, r = 0.4). Interestingly, the electrode locations determined using SPM12 were closer to the brain's surface than that determined for FSL4.1 (Wilcox Signed-Rank, p = .021, r = 0.36 Fig. 5B). This suggests that, if an implant MRI is not available or not warranted, the SPM12 approach is likely to be closer to the surface than the FSL4.1 approach.

Fig. 5.

Fig. 5

Proximity to surface. Box-and-Whisker plots showing the distribution of Euclidian distances between the electrode centroid and the closest pial smoothed-surface vertex, in millimeters, for A. grid- and B. strip- type electrodes. Data points represent median of all electrodes for an individual patient (N = 11 patients for grids and N = 30 patients for strips). The red line is the median for all patients when using the respective co-registration method. Stars(*) indicate p < .05 for paired sample, non-parametric Wilcox-Signed Rank tests.

3.2. Grid electrode localization is comparable to existing implant MRI based methods

Previously, Yang et al. (2012) developed a method to localize grids that was well validated using photomicrographs of electrode positions on the brain surface. To assess the accuracy of the novel method, we directly compared the final electrode locations after surface projection to locations predicted by using the method of Yang et al. (2012). The median distance between the locations was 1.9 +/− 2.2 mm, (n = 364 grid electrodes, N = 11 patients) (Fig. 6), i.e. within the diameter of a single electrode (2.5 mm) (Signtest, p = .02).

Fig. 6.

Fig. 6

Cross-methods comparison for grid electrodes. The three methods presented here were compared with a recent localization technique that also relies on post-operative MRI information, Yang et al., 2012. The median Euclidian distances between Yang's technique applied to this dataset, and the other methods (X-axis) are shown in the box-whisker plots above for N = 11 patients (blue dot). For ICP, the median distance across all patients and electrodes was 1.90 mm, with an interquartile range of 2.23 mm.

3.3. Differences in localization methods

The above results suggest that the novel approach is 1) highly accurate and/or 2) equally precise as either FSL4.1 or SPM12. To understand the magnitude of the difference, the distance between electrode localizations were compared across methods (FSL4.1-ICP, SPM12-FSL4.1 and ICP-SPM12) separately for grids, strips (Fig. 7) and depths (Fig. 8). The median difference between the ICP and the SPM12 method did not exceed the diameter of an electrode contact (2.5 mm) regardless of electrode type (Signtest, p = .47) (strips = 2.1 ± 1.5, grids = 1.6 ± 1.3 and depths 1.7 ± 1.0 mm). Conversely, the median difference between the FSL4.1 method and either the ICP or SPM12 method was greater than half the inter-electrode spacing for strips and grids, > 5.0 mm, (Signtest, p = .004)(FSL4.1 vs. ICP: Strip = 5.6 mm ± 3.9 mm; Grid = 5.8 mm ± 6.2 mm; FSL4.1 vs. SPM12: Strips = 5.9 mm ± 5.4 mm; Grids = 5.2 mm ± 6.1 mm) and as much as 4 mm for Depths (FSL4.1 vs. ICP: 4.1 mm ± 2.4 mm; FSL4.1 vs. SPM12: 3.5 mm ± 2.5 mm). For the depth electrode validation measure of surface proximity, there was no statistical difference between methods, suggesting that not only is the novel method highly accurate for surface electrodes, but it is also accurate for depth electrodes.

Fig. 7.

Fig. 7

Difference between methods. Box-and-whisker plots for each pairwise difference between the co-registration methods. Each patient's median DMethod is a sample point. The different electrode types A. strips (N = 30) and B. grid electrodes (N = 11) are shown in separate results. The FSL4.1 co-registration method is, on average, further than half the inter-electrode spacing, (5 mm), from either alternate method regarding both types of electrodes. Whereas, the SPM12 and ICP method differ by a median distance of 2.1 mm for strip electrodes and 1.7 mm for grid electrodes, which is less than one contact radius (2.5 mm).

Fig. 8.

Fig. 8

Depth electrode difference between methods. Box-and-whisker plots for each pair-wise difference between co-registration methods. Each sample point is an individual patient’s median Dmeth, for N=23 patients.

3.4. Run times and memory/processing resources for each approach

The run time for the 3D rendered brain surface and cortical reconstruction analysis is estimated using FreeSurfer5.3, i.e. recon-all; this stage is longest and will typically not be fully completed until the following day, however, FreeSurfer software yields top tier results for surface and cortical reconstructions and many subsequent steps can be automatically run in parallel.

The official FreeSurfer website estimate using “an AMD Opteron 64bit @ 2.5 GHz processor” is 20–40 h, but an informal estimate for our data set, utilizing an Intel(R) Core(TM) i7-3770 CPU @ 3.4 GHz the run-time was on average 10–20 h. All the below steps can be run in parallel with the surface and cortical reconstruction, scaling appropriately for image resolution and processor. For computer memory, each subject's set of raw dicom scans was about 100 Mb to 200 Mb. Saving all of the image volume files after transformations will result in a folder with total size between 750 Mb to 1500 Mb.

For the Mutual Information step, both SPM12 and FSL4.1 compute the co-registration within 5–15 min and can be done immediately in parallel with the reconstruction. For the post-implant MRI processing there is a skull strip and intensity normalization which take 5–10 min. The boundary-based registration (BBR) step then requires 5–10 min and can be set to automatically start in parallel, but only when the white/grey surface reconstruction step has completed during the recon-all process. After all co-registrations are done, extracting the metal artifacts from both post-implant images (CT and MRI) is instantaneous using intensity thresholding described in the methods. Finally, the ICP registration and ideal transformation calculation takes a mere 5–10 min on average. The optional last step is to project the electrodes onto the pre-implant brain surface via one of several methods, each taking roughly 5–10 min.

4. Discussion

4.1. Discussion of enhanced localization method

Optimized clinical outcomes for neurosurgical patients and related human electrophysiological research both depend on accurate electrode localizations. Here we show a method to improve the localization process by introducing the implant MRI as a source for electrode information relative to soft-tissue anatomy that ensure both surface and depth electrode are well localized with a single approach. The use of the implant MRI provides accurate co-registration results and automatically overcomes inter-modality errors from CT to MRI registrations, as validated by measuring the distance between hypothetical electrode locations and a physiological landmark, i.e. the brain surface from the pre-implant MRI. Moreover, while the metal artifacts from the implant MRI are difficult to distinguish for a human technician (Arnulfo et al., 2015), the artifacts from a standard implant CT clearly distinguishes individual contacts and electrode centroids and the novel approach can be used to automatically assign individual contacts for labeling. By using both CT and MRI implant images the limitations inherent in using a single scan can be avoided because the pre- and post-surgical images are automatically registered with the smallest degree of error. Thus, when implant-MRI is available, this work improves the established method of automated electrode localization by providing a single approach to localize both surface and depth electrodes.

For grid electrodes, after TICP alignment, electrode location resulted in surface proximities that were significantly smaller than uncorrected locations, which relied on mutual information co-registration algorithms from either SPM12 or FSL4.1, (p = .001, Wilcox-Sign Rank).. A limitation of this approach is that, due to brain deformation around implant sites, the method closest to the surface may not necessarily be the most accurate. However the close proximities for all three methods show them to be in general agreement. By using the void artifacts as landmarks to determine a transformation correction, the errors from inter-modality CT to MRI registration are abrogated. This studie's PCT values for surface proximity are close to those in previously reported studies (3.04 mm; Dykstra et al., 2012) (2.3 mm grid only; Laviolette et al., 2011).

When compared to a localization method that also relies on implant MRI for localization of intracranial grid electrodes, e.g. the locations predicted using the method of Yang et al., the ICP method on average was localized within a distance less than a contact radius of a surface electrode (DICP-Yang = 1.9 mm), which is an acceptable range for most tailored surgeries. It is important to note that the semi-automated approach developed by Yang et al. cannot be applied to depth electrodes and must be manually applied to strip electrodes as well as three corner grid electrodes. The differences between the SPM12 method and that of Yang (DSPM-Yang = 2.5 mm) is similar to a previous study that measured the error from CT derived coordinates, (2.3 mm; Laviolette et al., 2011). The ~2.0 mm difference could have been exacerbated by the different surface projection methods. Yang et al., uses an isometric-dilation, i.e. the inter-electrode distances are preserved and the points are radiated out towards the surface from an origin approximately at the brain's center. Whereas, we employed a surface normal projection based on the electrode's relative geometry on the silastic sheet it was implanted on (Taimouri et al., 2013).

The difference between SPM12 and ICP derived centroids for depth electrodes, DSPM-ICP = 1.7 mm, matches the measured difference in CT-MR derived coordinates from a previous study (1.2 mm at ‘tip’ and 2.3 mm at ‘base’; van Rooijen et al., 2013a, van Rooijen et al., 2013b). This is within an acceptable range to be functionally identical for most excision surgeries. However, when SPM12 or ICP are compared to FSL4.1, the difference is greater than an entire electrode diameter, i.e. DSPM-FSL > 5.0 mm, which can lead to significantly different localizations. It is beyond the scope of this paper to analyze the differences in the FSL4.1 and SPM12 software implementation of mutual information. However, one possibility is that the discrepancy arises during interpolation of the volume after the co-registration transform is applied. Alternatively, it might be due to the fact that FSL4.1 uses different iterations to maximize the mutual information cost-function. There is one formal report (van Rooijen et al., 2013b) that mutual information was the best cost function when compared to correlation ratio and least squares, however this is the first comparison between different software implementations of mutual information algorithms.

4.2. Limitations

In any image co-registration paradigm, the registration error can be corrected through manual adjustments by an experienced technician; however, this process is prohibitively time consuming and studies will still suffer from inter-user variability. This is why the novel method strives to maintain as much automation as possible, thereby obviating the need for a trained technician. However, the enhanced process is not completely automated. Semi-manual identification of each electrode centroid to a specific recording channel is still necessary (Fig. S1). Briefly, after the post-implant CT and pre-implant-MRI are co-registered, then a trained expert must use a combination of visualization software and hand-taken notes from the operating room to meticulously and precisely assign a centroid to a single voxel from the co-registered CT scan metal artifacts along with its corresponding channel. The process takes anywhere from 2 to 4 h depending on the total number of electrodes implanted in the patient, which can typically range from 50 to 150.

From Table 3, we see that the enhanced method while employing two extra steps does not require signifcant more run-time and the critical bottle neck is actually the above centroid-channel correspondence step which can itself be fully-manual or semi-automated. There are two extra steps in the enhanced method that add 10–20 min, however the centroid-channel correspondence step is semi-automated in the enhanced methods, so this indeed saves 1–2 h.

Table 3.

Localization approach steps and run times in parallel layout. Run times are shown for one typical subject and 1.0 mm3 resolution MRI scans and 0.5 mm3 CT scan; the files will occupy roughly 1.0 Gb of hard disk space. Steps are ordered from first (top) to last (bottom).

Surface and cortical reconstruction (FreeSurfer5.3) Standard (SPM12 or FSL4.1) [preMRI/postCT] Enhanced (ICP) [preMRI/postCT/postMRI]
Recon-all (10–20 h total) White/Grey surface complete (8–12 h) Mutual Information registration (5–10 min) Intensity normalization + skull strip (5–10 min)
Boundary-based registration (5–10 min
Extract artifacts via intensity; maximum Extract artifacts via intensity; less than grey matter
ICP registration (5–10 min)
Spherical surface registration to atlas (2–4 h) Manual centroid-channel-correspondence (2.0–4.0 h) Semi-automated centroid-channel-correspondence (0.5–1.0 h)
(optional) Cortical Parcellations (5–10 min) (optional) Surface Projection (5–10 min) (optional) Surface Projection (5–10 min)
Total: 10–20 h Total: 2.25–4.33 h Total: 1.33–1.66 h

The bulk of signal voids are accurately located in the implant MRI, however, the edge of the contacts are distorted by the artifact's penumbra, enlarging the electrode's shadow by up to three times its size (Hoffmann et al., 2008). Recently, it has been shown that with proper MRI sequence settings the distortion can be reduced to less than double the actual contact size (Sarkar et al., 2014). Therefore, the ICP approach, applied with proper MRI sequencing should still be highly accurate for surface and depth electrodes.

5. Conclusion

For intracranial EEG analysis, it is beneficial to have the most accurate electrode localizations possible with little to no manual intervention necessary. The proposed localization method is automatic and accurate because it uses signals from the implant MRI as the ground truth for electrode positions relative to soft-tissue anatomy. Importantly, the two other scans, pre-implant MRI and implant CT, as well as multiple image processing software packages are still required to localize electrodes to corresponding brain morphology. The implant MRI scan has limitations such as artifact size and discriminability as well as safety considerations using magnetic resonance equipment with metal electrodes. However, using the complete set of images in the enhanced manner shown here, the individual limitations from each scan are effectively circumvented and a single, automated approach can be utilized with comparable accuracy to existing methods.

Disclosure

The authors have no conflict of interest to disclose and there were no conflicts of interest in this study.

Acknowledgments

The authors would like to thank the nurses and the electroencephalography technicians at the epilepsy monitoring unit at Thomas Jefferson University Hospital for facilitating patient data collection and also the School of Biomedical Engineering, Science and Health systems at Drexel University.

Footnotes

Appendix A

Supplementary data to this article can be found online at https://doi.org/10.1016/j.nicl.2018.07.026.

Appendix A. Supplementary data

Supplementary material

mmc1.pdf (414KB, pdf)

References

  1. Arnulfo G., Narizzano M., Cardinale F., Fato M.M., Palva J.M. Automatic segmentation of deep intracerebral electrodes in computed tomography scans. BMC Bioinformatics. 2015;16(1):99. doi: 10.1186/s12859-015-0511-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  2. Besl P.J., McKay N.D. IEEE transactions on pattern analysis and machine intelligence. IEEE Trans. Pattern Anal. Mach. Intell. 1992;14(2):239–258. [Google Scholar]
  3. Carmichael D.W., Thornton J.S., Rodionov R. Safety of localizing epilepsy monitoring intracranial electroencephalograph electrodes using MRI: radiofrequency-induced heating. J. Magn. Reson. Imaging. 2008;28(5):1233–1244. doi: 10.1002/jmri.21583. [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Carmichael D.W., Thornton J.S., Rodionov R. Feasibility of simultaneous intracranial EEG-fMRI in humans: a safety study. NeuroImage. 2010;49:379–390. doi: 10.1016/j.neuroimage.2009.07.062. [DOI] [PubMed] [Google Scholar]
  5. Collignon A., Maes F., Delaere D. 1995. Automated Multi-modality Image Registration Based on Information Theory. Bizais; p. 5. [Google Scholar]
  6. Connover W., Iman R. Rank transformations as a bridge between parametric and nonparametric statistics. Am Stat. 1981;35(September) [Google Scholar]
  7. Crum W., Griffin L., Hill D.L., Hawkes D. Zen and the art of medical image registration: correspondence, homology, and quality. NeuroImage. 2003;20(3):1425–1437. doi: 10.1016/j.neuroimage.2003.07.014. [DOI] [PubMed] [Google Scholar]
  8. Dykstra A.R., Chan A.M., Quinn B.T. Individualized localization and cortical surface-based registration of intracranial electrodes. NeuroImage. 2012;59(4):3563–3570. doi: 10.1016/j.neuroimage.2011.11.046. [DOI] [PMC free article] [PubMed] [Google Scholar]
  9. Ester M., Kriegel H.-P., Sander J., Xu X. Kdd. vol 96. 1996. A density-based algorithm for discovering clusters in large spatial databases with noise; pp. 226–231. [Google Scholar]
  10. Field A. Discovering statistics using IBM SPSS statistics. Sage. 2016 [Google Scholar]
  11. Greve D.N., Fischl B. NeuroImage accurate and robust brain image alignment using boundary-based registration. NeuroImage. 2009;48(1):63–72. doi: 10.1016/j.neuroimage.2009.06.060. [DOI] [PMC free article] [PubMed] [Google Scholar]
  12. Guenot M., Isnard J., Ryvlin P. Neurophysiological monitoring for epilepsy surgery: the Talairach SEEG method. Stereotact. Funct. Neurosurg. 2001;77(1–4):29–32. doi: 10.1159/000064595. http://www.karger.com [DOI] [PubMed] [Google Scholar]
  13. Hebb A.O., Miller K.J. Semi-automatic stereotactic coordinate identification algorithm for routine localization of deep brain stimulation electrodes. J. Neurosci. Methods. 2010;187(1):114–119. doi: 10.1016/j.jneumeth.2009.12.016. [DOI] [PubMed] [Google Scholar]
  14. Hermes D., Miller K.J., Noordmans H.J., Vansteensel M.J., Ramsey N.F. Automated electrocorticographic electrode localization on individually rendered brain surfaces. J. Neurosci. Methods. 2010;185(2):293–298. doi: 10.1016/j.jneumeth.2009.10.005. [DOI] [PubMed] [Google Scholar]
  15. Hermes D., Miller K.J., Vansteensel M.J., Aarnoutse E.J., Leijten F.S.S., Ramsey N.F. Neurophysiologic correlates of fMRI in human motor cortex. Hum. Brain Mapp. 2012;1699(July 2010):1689–1699. doi: 10.1002/hbm.21314. [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Hoffmann D., Russo G., Cossu M. Stereoelectroencephalography. In: Luders H., editor. Textbook of Epilepsy Surgery. Informa Healthcare; London: 2008. p. 946. [Google Scholar]
  17. Hunter J.D., Hanan D.M., Singer B.F. Locating chronically implanted subdural electrodes using surface reconstruction. Clin. Neurophysiol. 2005;116(8):1984–1987. doi: 10.1016/j.clinph.2005.03.027. [DOI] [PubMed] [Google Scholar]
  18. Jenkinson M., Smith S. A global optimisation method for robust affine registration of brain images. Med. Image Anal. 2001;5(2):143–156. doi: 10.1016/s1361-8415(01)00036-6. [DOI] [PubMed] [Google Scholar]
  19. Jenkinson M., Bannister P., Brady M., Smith S. Improved optimization for the robust and accurate linear registration and motion correction of brain images. NeuroImage. 2002;841:825–841. doi: 10.1016/s1053-8119(02)91132-8. [DOI] [PubMed] [Google Scholar]
  20. Kerby D.S. The simple difference formula: an approach to teaching nonparametric correlation. Compr. Psychol. 2014;3(1) 11.IT.3.1. [Google Scholar]
  21. Kjer H.M., Wilm J. 2010. Evaluation of Surface Registration Algorithms for PET Motion Correction Bachelor Thesis. [Google Scholar]
  22. Klein A., Tourville J. 101 labeled brain images and a consistent human cortical labeling protocol. Front. Neurosci. 2012;6(December):171. doi: 10.3389/fnins.2012.00171. [DOI] [PMC free article] [PubMed] [Google Scholar]
  23. Lachaux J.P., Rudrauf D., Kahane P. Intracranial EEG and human brain mapping. J. Physiol. Paris. 2004;97(4–6):613–628. doi: 10.1016/j.jphysparis.2004.01.018. [DOI] [PubMed] [Google Scholar]
  24. Lachaux J., Jerbi K., Bertrand O., Minotti L., Hoffmann D. A Blueprint for Real-time Functional Mapping via Human Intracranial Recordings. 2007. Schoendorff B; p. 10. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Laviolette P., Rand S., Ellingson B. 3D visualization of subdural electrode shift as measured at craniotomy reopening. Epilepsy Res. 2011;94(1–2):102–109. doi: 10.1016/j.eplepsyres.2011.01.011. http://www.sciencedirect.com/science/article/pii/S0920121111000301 2011 March. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Maes F., Collignon A., Vandermeulen D., Marchal G., Suetens P. Multimodality image registration by maximization of mutual information. IEEE Trans. Med. Imaging. 1997;16(2):187–198. doi: 10.1109/42.563664. [DOI] [PubMed] [Google Scholar]
  27. McGraw K.O., Wong S.P. A common language effect size statistic. Psychol. Bull. 1992;111(2):361–365. [Google Scholar]
  28. Misra A., Burke J.F., Ramayya A.G. Methods for implantation of micro-wire bundles and optimization of single/multi-unit recordings from human mesial temporal lobe. J. Neural. Eng. 2014;11(2):2013. doi: 10.1088/1741-2560/11/2/026013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  29. Morris K., O'Brien T.J., Cook M.J., Murphy M., Bowden S.C. A computer-generated stereotactic “Virtual Subdural Grid” to guide resective epilepsy surgery. AJNR Am. J. Neuroradiol. 2004;25(1):77–83. http://www.ncbi.nlm.nih.gov/pubmed/14729533 [PMC free article] [PubMed] [Google Scholar]
  30. Nelles M., Koenig R., Kandyba J., Schaller C., Urbach H. Fusion of MRI and CT with subdural grid electrodes. Zentralbl. Neurochir. 2004;65(4):174–179. doi: 10.1055/s-2004-820354. [DOI] [PubMed] [Google Scholar]
  31. Pallant J. 3rd edn. 2007. SSPS: Survival Manual. England. [Google Scholar]
  32. Pallavaram S., Dawant B.M., Remple M.S. Effect of brain shift on the creation of functional atlases for deep brain stimulation surgery. Int. J. Comput. Assist. Radiol. Surg. 2010;5(3):221–228. doi: 10.1007/s11548-009-0391-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  33. Pieters T. Recursive grid partitioning on a cortical surface model: an optimized technique for the localization of implanted subdural electrodes. J. Neurosurg. 2013;118(May):1086–1097. doi: 10.3171/2013.2.JNS121450. [DOI] [PubMed] [Google Scholar]
  34. Pluim J.P.W., Maintz J.B.A., Viergever M.A. Mutual-information-based registration of medical images : a survey. IEEE Trans. Biomed. Eng. 2003;22(8):986–1004. doi: 10.1109/TMI.2003.815867. [DOI] [PubMed] [Google Scholar]
  35. Rodionov R., Vollmar C., Nowell M. Feasibility of multimodal 3D neuroimaging to guide implantation of intracranial EEG electrodes. Epilepsy Res. 2013;107(1–2):91–100. doi: 10.1016/j.eplepsyres.2013.08.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  36. Sarkar S.N., Sarkar P.R., Papavassiliou E., Rojas R.R. Utilizing fast spin Echo MRI to reduce image artifacts and improve implant / tissue Interface detection in refractory Parkinson's patients with deep brain stimulators. Parkinsons Dis. 2014;2014 doi: 10.1155/2014/508576. [DOI] [PMC free article] [PubMed] [Google Scholar]
  37. Smith S.J.M. EEG in the diagnosis, classification, and management of patients with epilepsy. J. Neurol. Neurosurg. Psychiatry. 2005;76(Suppl. 2):2–7. doi: 10.1136/jnnp.2005.069245. [DOI] [PMC free article] [PubMed] [Google Scholar]
  38. Stefan H., Pauli E., Eberhard F., Ugrinovich R., Buchfelder M. “ Tailoring” resections in drug refractory temporal lobe epilepsy. Nervenarzt. 1996;67(4):306–310. [PubMed] [Google Scholar]
  39. Studholme C., Novotny E., Zubal I.G., Duncan J.S. Estimating tissue deformation between functional images induced by intracranial electrode implantation using anatomical MRI. NeuroImage. 2001;13(4):561–576. doi: 10.1006/nimg.2000.0692. [DOI] [PubMed] [Google Scholar]
  40. Taimouri V., Akhondi-Asl A., Tomas-Fernandez X. Electrode localization for planning surgical resection of the epileptogenic zone in pediatric epilepsy. Int. J. Comput. Assist. Radiol. Surg. June 2013 doi: 10.1007/s11548-013-0915-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Tao J.X., Hawes-Ebersole S., Baldwin M., Shah S., Erickson R.K., Ebersole J.S. The accuracy and reliability of 3D CT/MRI co-registration in planning epilepsy surgery. Clin. Neurophysiol. 2009;120(4):748–753. doi: 10.1016/j.clinph.2009.02.002. [DOI] [PubMed] [Google Scholar]
  42. van Rooijen B.D., Backes W.H., Schijns O.E.M.G., Colon A., Hofman P. A M. Brain imaging in chronic epilepsy patients after depth electrode (Stereoelectroencephalography) implantation: magnetic resonance imaging or computed tomography? Neurosurgery. 2013;73(3):543–549. doi: 10.1227/01.neu.0000431478.79536.68. [DOI] [PubMed] [Google Scholar]
  43. van Rooijen B.D., Backes W.H., Schijns O.E.M.G., Colon A., Hofman P.A.M. Brain imaging in chronic epilepsy patients after depth electrode (stereoelectroencephalography) implantation: magnetic resonance imaging or computed tomography? Neurosurgery. 2013;73(3):543–549. doi: 10.1227/01.neu.0000431478.79536.68. [DOI] [PubMed] [Google Scholar]
  44. Van Veelen C., Debets R. Combined use of subdural and intracerebral electrodes in preoperative evaluation of epilepsy. Neurosurgery. 1990;26(1):93–101. doi: 10.1097/00006123-199001000-00013. http://scholar.google.com/scholar?hl=en&btnG=Search&q=intitle:Combined+use+of+subdural+and+intracerebral+electrodes+in+preoperative+evaluation+of+epilepsy#0 1990 January. [DOI] [PubMed] [Google Scholar]
  45. Wang L., Saalmann Y.B., Pinsk M.A., Arcaro M.J., Kastner S. CellPress; 2012. Electrophysiological Low-Frequency Coherence and Cross-frequency Coupling Contribute to BOLD Connectivity. [DOI] [PMC free article] [PubMed] [Google Scholar]
  46. Wellmer J., von Oertzen J., Schaller C. Digital photography and 3D MRI-based multimodal imaging for individualized planning of resective neocortical epilepsy surgery. Epilepsia. 2002;43(12):1543–1550. doi: 10.1046/j.1528-1157.2002.30002.x. http://www.ncbi.nlm.nih.gov/pubmed/12460257 [DOI] [PubMed] [Google Scholar]
  47. Wells W.M., Viola P., Atsumi H., Nakajima S., Kikinis R. Multi-modal volume registration by maximization of mutual information. Med. Image Anal. 1996;1(1):35–51. doi: 10.1016/s1361-8415(01)80004-9. [DOI] [PubMed] [Google Scholar]
  48. Wu J., Davis K., Azarion A. Brain Parcellation Aids in Electrode Localization in Epileptic Patients. Augment Environ Comput Interv. 2012:130–137. 7264 (Lecture Notes in Computer Science) [Google Scholar]
  49. Yang A.I., Wang X., Doyle W.K. Localization of dense intracranial electrode arrays using magnetic resonance imaging. NeuroImage. 2012;63(1):157–165. doi: 10.1016/j.neuroimage.2012.06.039. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary material

mmc1.pdf (414KB, pdf)

Articles from NeuroImage : Clinical are provided here courtesy of Elsevier

RESOURCES