A Pipeline for 3D Multimodality Image Integration and Computer-assisted Planning in Epilepsy Surgery

Epilepsy surgery is challenging and the use of 3D multimodality image integration (3DMMI) to aid presurgical planning is well-established. Multimodality image integration can be technically demanding, and is underutilised in clinical practice. We have developed a single software platform for image integration, 3D visualization and surgical planning. Here, our pipeline is described in step-by-step fashion, starting with image acquisition, proceeding through image co-registration, manual segmentation, brain and vessel extraction, 3D visualization and manual planning of stereoEEG (SEEG) implantations. With dissemination of the software this pipeline can be reproduced in other centres, allowing other groups to benefit from 3DMMI. We also describe the use of an automated, multi-trajectory planner to generate stereoEEG implantation plans. Preliminary studies suggest this is a rapid, safe and efficacious adjunct for planning SEEG implantations. Finally, a simple solution for the export of plans and models to commercial neuronavigation systems for implementation of plans in the operating theater is described. This software is a valuable tool that can support clinical decision making throughout the epilepsy surgery pathway.


Introduction
In surgical practice it is crucial for the surgeon to appreciate anatomical structures and their spatial relationships to one another in three dimensions. This is especially important in neurosurgery, where the surgeon is working in a confined space, with limited visualization and access to complex anatomy. Despite this, to date most imaging has been presented to surgeons in conventional planar 2D form, and different imaging modalities are often presented one after another in series. As a consequence, the surgeon has to mentally integrate this data for each patient, and place it into an anatomical framework for presurgical planning. There is clear benefit in generating 3D computer models of the individual patient brain, which demonstrates the anatomy of the cortex, the blood vessels, any pathological lesions present as well as other relevant 3D landmarks in the same spatial context [1][2][3][4] . Before surgery the surgeon can rotate and alter the transparency of these models, to fully understand the 3D relationships between different structures of interest. This principle is termed 3D multimodality imaging (3DMMI).
The aim of pre-surgical evaluation for epilepsy surgery is to infer the localization of the area of the brain where seizures arise, and ensure that this can be safely resected without causing significant deficits 5 . There is a wide range of diagnostic imaging modalities that contribute to this, including structural MRI, fluorodeoxyglucose positron emission tomography (FDG-PET), ictal single photon emission computed tomography (SPECT), magnetoencephalography (MEG) dipoles, functional MRI (fMRI) and diffusion tensor imaging (DTI) 6 . Epilepsy surgery is ideally suited for 3DMMI since it requires the simultaneous interpretation of multiple data sets, and the consideration of how each data set relates to another.
In many cases non-invasive investigations fail to provide the level of evidence required to proceed to resection. In these cases intracranial EEG (IC EEG) recordings are necessary to identify the region of the brain that must be removed to prevent seizures. Increasingly, IC EEG is performed by a technique called SEEG, in which a number of recording depth electrodes are placed intracerebrally to capture the origin and propagation of electrical activity associated with seizures in 3D 1,[7][8][9][10] . The first step of SEEG implantations is to develop the strategy of the implantation, defining the areas of the brain that need to be sampled. This involves integrating the clinical and non-invasive EEG date, with structural imaging, with any lesion, and functional imaging data that infer the location of the source of the epilepsy.
The feasibility of generating 3DMMI models to guide implantation of IC EEG electrodes in a busy epilepsy surgery practice has previously been demonstrated 11 . We have also demonstrated the principle that the use of 3DMMI confers added value in clinical decision-making. In a prospective study, disclosure of 3DMMI changed some aspect of management in 43/54 (80%) cases, and specifically changed the positioning of 158/212 (75%) of depth electrodes 12 .
There is a range of software packages that facilitate 3DMMI. These include commercially available neuronavigation platforms that are used in the operating theater, specialised planning software suites allied with neuronavigation platforms and research-orientated stand-alone image integration and visualization platforms. As the functionality, flexibility and versatility of these platforms increase, the usability and likelihood of translating them into clinical practice correspondingly decreases.
We have developed custom-designed software for multimodality image integration, advanced 3D visualization and SEEG electrode placement planning 12,13 for the treatment of epilepsy. The emphasis is on ease of use in a clinical scenario, allowing real time use of software by clinicians, and rapid incorporation into the clinical pipeline. The software runs on a translational imaging platform 14 , that combines NiftyReg, NiftySeg and NiftyView.
In this paper the protocol for using the software in clinical practice is set out. The steps for image co-registration, segmentation of regions of interest, brain segmentation, extracting blood vessels from dedicated vascular imaging 15 , building 3D models, planning SEEG implantations and rapidly exporting models and plans to the operating theater are described. A novel tool is also described for automated multi-trajectory planning 13 , that increases the safety and efficacy of the implantations and substantially reduces the duration of planning.

Perform Image Integration and Visualization
1. Acquire imaging.
1. Acquire neuronavigation T1-weighted MRI scan with gadolinium enhancement-this will be the reference image. (Note: Image acquisition requirements are available from the neuronavigation commercial supplier 11,12 . See Table 1 3. Open in-house software on Windows PC and load data (Figure 1).
1. Note 2 x 2 window display, DataManager on far left, icons on top representing different image processing tools and selected tool on far right. 2. Import data using 'drag and drop', by accessing the main menu "File/Open" or by a speed button (icon) "Open". Scroll through different data sets to ensure completeness. Note the zoom function by right clicking and moving mouse, and the hierarchical nature of DataManager, with consecutive image overlay. , with the implantation of 319 depth electrodes. 27/35 (77%) of patients have progressed to a cortical resection following implantation, which is an indicator that the implantation identified the area of seizure onset. There has been one haemorrhagic complication related to the placement of depth electrodes, and this was treated conservatively.
The imaging modalities used during the presurgical evaluation are decided on a case-by case basis, and are described in Table 1. The protocol is flexible, and can incorporate any imaging modality that can be imported into DICOM or Nifti format. Figure 1 demonstrates the basic viewer for our in-house software platform, and Figures 2, 3, 4 and 5 illustrate typical screenshots during the building of the 3D multimodality models.
The seamless integration of this protocol into our clinical pipeline, and the dissemination of this software to other centres, is a useful surrogate 'marker' of success. The difficulties in assessing clinical benefit in the epilepsy surgery population are well known and described elsewhere 12 . This pipeline offers a streamlined solution, which is flexible, relatively user-friendly, and easy to replicate in other centres.
Computer-assisted planning (CAP) is a recent development that has been retrospectively tested on previous manually planned implantations 16 .
Preliminary results suggest that CAP generates safer, more efficient implantations, that are feasible to implement and that are completed in a time effective manner 16. Table 2 demonstrates this quantitative comparison. A prospective trial of using CAP in clinical practice is underway. The algorithm that drives CAP has been previously described 13 . Figure 6 shows a typical outcome from the automated multi-trajectory planner. The critical structures that have been entered are veins, arteries and surface sulci. Note the centring of the trajectories on the crown of the gyri, and the constraining of trajectory entry points to a scalp exclusion mask. Figure 7 shows a typical risk visualization graph for an individual trajectory, with associated metrics and graphic representation of trajectory length.  Top-length, angle traversing skull, risk, G/W ratio and minimum distance from a blood vessel >1 mm in diameter. Middle-graphic display of closest critical structure along length of trajectory (red-artery, cyan-vein, y-axis-distance to structure(maximum 10 mm), x-axis-distance along trajectory from brain entry to target, SM-safety margin represented as horizontal red line that marks 3 mm separation of trajectory to critical structure). Bottom-graphic display of trajectory path through grey and white matter (green-extracerebral, grey-grey matter, white-white matter). Please click here to view a larger version of this figure.

Discussion
In summary, the crucial steps for image integration and 3D visualization are image co-registration, segmentation of brain, vessels and other structures or areas of interest, and export to a neuronavigation system. This process was previously performed in the group using commercially available image integration software. A disadvantage to this pipeline was the time taken, with the entire process taking 2 -4 hr. Using our inhouse software platform, this pipeline is simplified considerably, and can be completed in 1 -2 hr. Further, there is the added functionality of surgical planning of SEEG electrode trajectories on this software, that can be done manually or with computer-assistance. The benefits of CAP over manual planning are increased precision, reduced risk and increased speed, and have been discussed elsewhere (Nowell et  The in-house software platform is in continuous development, with new tools and functionality being added to support all stages of presurgical evaluation and surgical management. There is therefore a need for rigorous testing at each new version release. Current limitations of the software include a lack of high quality volume rendering, which is present in other platforms and is a valuable addition for advanced 3D visualization. Also export is only compatible with a selected neuronavigation company at the present time. These limitations have not affected the clinical utility of the software in our unit, and have not slowed the dissemination of the technology to other centres.
The significance of this software is that it removes the barriers that previous groups have cited as reasons for not using 3DMMI. The solution provides easy to use tools in one single platform, that does not require specialist training or expertise, is time and cost-effective and is easily translated into clinical practice. We have plans to add further innovations to the software to support Epilepsy Surgery. Furthermore, the methods could easily be applied to other areas of neurosurgery, such as resection of low grade tumours close to eloquent cortex, focal lesioning and delivery of targeted stimulation. 3DMMI and precise surgical planning tools are likely to become increasingly important in modern surgery, as more challenging cases are taken on and as minimally invasive treatments enter common practice.