We present a method for collecting electrocorticographic signals for research purposes from humans who are undergoing invasive epilepsy monitoring. We show how to use the BCI2000 software platform for data collection, signal processing and stimulus presentation. Specifically, we demonstrate SIGFRIED, a BCI2000-based tool for real-time functional brain mapping.
Neuroimaging studies of human cognitive, sensory, and motor processes are usually based on noninvasive techniques such as electroencephalography (EEG), magnetoencephalography or functional magnetic-resonance imaging. These techniques have either inherently low temporal or low spatial resolution, and suffer from low signal-to-noise ratio and/or poor high-frequency sensitivity. Thus, they are suboptimal for exploring the short-lived spatio-temporal dynamics of many of the underlying brain processes. In contrast, the invasive technique of electrocorticography (ECoG) provides brain signals that have an exceptionally high signal-to-noise ratio, less susceptibility to artifacts than EEG, and a high spatial and temporal resolution (i.e., <1 cm/<1 millisecond, respectively). ECoG involves measurement of electrical brain signals using electrodes that are implanted subdurally on the surface of the brain. Recent studies have shown that ECoG amplitudes in certain frequency bands carry substantial information about task-related activity, such as motor execution and planning1, auditory processing2 and visual-spatial attention3. Most of this information is captured in the high gamma range (around 70-110 Hz). Thus, gamma activity has been proposed as a robust and general indicator of local cortical function1-5. ECoG can also reveal functional connectivity and resolve finer task-related spatial-temporal dynamics, thereby advancing our understanding of large-scale cortical processes. It has especially proven useful for advancing brain-computer interfacing (BCI) technology for decoding a user's intentions to enhance or improve communication6 and control7. Nevertheless, human ECoG data are often hard to obtain because of the risks and limitations of the invasive procedures involved, and the need to record within the constraints of clinical settings. Still, clinical monitoring to localize epileptic foci offers a unique and valuable opportunity to collect human ECoG data. We describe our methods for collecting recording ECoG, and demonstrate how to use these signals for important real-time applications such as clinical mapping and brain-computer interfacing. Our example uses the BCI2000 software platform8,9 and the SIGFRIED10 method, an application for real-time mapping of brain functions. This procedure yields information that clinicians can subsequently use to guide the complex and laborious process of functional mapping by electrical stimulation.
Prerequisites and Planning:
Patients with drug-resistant partial epilepsy may be candidates for resective surgery of an epileptic focus to minimize the frequency of seizures. Prior to resection, the patients undergo monitoring using subdural electrodes for two purposes: first, to localize the epileptic focus, and second, to identify nearby critical brain areas (i.e., eloquent cortex) where resection could result in long-term functional deficits. To implant electrodes, a craniotomy is performed to open the skull. Then, electrode grids and/or strips are placed on the cortex, usually beneath the dura. A typical grid has a set of 8 x 8 platinum-iridium electrodes of 4 mm diameter (2.3 mm exposed surface) embedded in silicon with an inter-electrode distance of 1cm. A strip typically contains 4 or 6 such electrodes in a single line. The locations for these grids/strips are planned by a team of neurologists and neurosurgeons, and are based on previous EEG monitoring, on a structural MRI of the patient's brain, and on relevant factors of the patient's history. Continuous recording over a period of 5-12 days serves to localize epileptic foci, and electrical stimulation via the implanted electrodes allows clinicians to map eloquent cortex. At the end of the monitoring period, explantation of the electrodes and therapeutic resection are performed together in one procedure.
In addition to its primary clinical purpose, invasive monitoring also provides a unique opportunity to acquire human ECoG data for neuroscientific research. The decision to include a prospective patient in the research is based on the planned location of their electrodes, on the patient's performance scores on neuropsychological assessments, and on their informed consent, which is predicated on their understanding that participation in research is optional and is not related to their treatment. As with all research involving human subjects, the research protocol must be approved by the hospital's institutional review board. The decision to perform individual experimental tasks is made day-by-day, and is contingent on the patient's endurance and willingness to participate. Some or all of the experiments may be prevented by problems with the clinical state of the patient, such as post-operative facial swelling, temporary aphasia, frequent seizures, post-ictal fatigue and confusion, and more general pain or discomfort.
At the Epilepsy Monitoring Unit at Albany Medical Center in Albany, New York, clinical monitoring is implemented around the clock using a 192-channel Nihon-Kohden Neurofax monitoring system. Research recordings are made in collaboration with the Wadsworth Center of the New York State Department of Health in Albany. Signals from the ECoG electrodes are fed simultaneously to the research and the clinical systems via splitter connectors. To ensure that the clinical and research systems do not interfere with each other, the two systems typically use separate grounds. In fact, an epidural strip of electrodes is sometimes implanted to provide a ground for the clinical system. Whether research or clinical recording system, the grounding electrode is chosen to be distant from the predicted epileptic focus and from cortical areas of interest for the research. Our research system consists of eight synchronized 16-channel g.USBamp amplifier/digitizer units (g.tec, Graz, Austria). These were chosen because they are safety-rated and FDA-approved for invasive recordings, they have a very low noise-floor in the high-frequency range in which the signals of interest are found, and they come with an SDK that allows them to be integrated with custom-written research software. In order to capture the high-gamma signal accurately, we acquire signals at 1200Hz sampling rate-considerably higher than that of the typical EEG experiment or that of many clinical monitoring systems. A built-in low-pass filter automatically prevents aliasing of signals higher than the digitizer can capture. The patient's eye gaze is tracked using a monitor with a built-in Tobii T-60 eye-tracking system (Tobii Tech., Stockholm, Sweden). Additional accessories such as joystick, bluetooth Wiimote (Nintendo Co.), data-glove (5th Dimension Technologies), keyboard, microphone, headphones, or video camera are connected depending on the requirements of the particular experiment.
Data collection, stimulus presentation, synchronization with the different input/output accessories, and real-time analysis and visualization are accomplished using our BCI2000 software8,9. BCI2000 is a freely available general-purpose software system for real-time biosignal data acquisition, processing and feedback. It includes an array of pre-built modules that can be flexibly configured for many different purposes, and that can be extended by researchers' own code in C++, MATLAB or Python. BCI2000 consists of four modules that communicate with each other via a network-capable protocol: a Source module that handles the acquisition of brain signals from one of 19 different hardware systems from different manufacturers; a Signal Processing module that extracts relevant ECoG features and translates them into output signals; an Application module that delivers stimuli and feedback to the subject; and the Operator module that provides a graphical interface to the investigator.
A number of different experiments may be conducted with any given patient. The priority of experiments will be determined by the location of the particular patient's electrodes. However, we usually begin our experimentation using the SIGFRIED (SIGnal modeling For Realtime Identification and Event Detection) mapping method, which detects and displays significant task-related activity in real time. The resulting functional map allows us to further tailor subsequent experimental protocols and may also prove as a useful starting point for traditional mapping by electrocortical stimulation (ECS).
Although ECS mapping remains the gold standard for predicting the clinical outcome of resection, the process of ECS mapping is time consuming and also has other problems, such as after-discharges or seizures. Thus, a passive functional mapping technique may prove valuable in providing an initial estimate of the locus of eloquent cortex, which may then be confirmed and refined by ECS. The results from our passive SIGFRIED mapping technique have been shown to exhibit substantial concurrence with the results derived using ECS mapping10.
The protocol described in this paper establishes a general methodology for gathering human ECoG data, before proceeding to illustrate how experiments can be initiated using the BCI2000 software platform. Finally, as a specific example, we describe how to perform passive functional mapping using the BCI2000-based SIGFRIED system.
1. Electrode Localization
- Collect a pre-operative T1-weighted structural MRI (1.5T or 3T) of the patient's head: 256 x 256 pixels per slice, full field of view, no interpolation, 1 mm slice width, preferably sagittal cross-sections.
- Observe the surgical implantation of the grids and strips. Collect digital photographs of the electrodes in situ, and the neurosurgeon's notes on the locations of the implanted grids and strips.
- Collect the post-operative skull X-ray images and brain CT scans at high resolution (1 mm slice width, skin to skin, no angle).
- Create a three-dimensional cortical model of the patient's brain using the pre-operative MRI, and co-register it with the post-grid implantation CT images. We use the CURRY software package for this purpose, and export the 3D cortical structure and electrode coordinates in MATLAB format. From MATLAB, we export a movie that shows the electrodes mapped onto the brain. We also map the electrode coordinates to standard Brodmann areas using an automated Talairach atlas.
- Review the information from the 3D model, X-ray images, photographs and notes. Finalize a numbering scheme for the electrodes, and work with the hospital technicians to ensure that the electrodes are patched into the splitter boxes following this numbering exactly. Also create a schematic layout for plotting the electrodes in two dimensions, such that all the electrode positions can be clearly distinguished without overlapping. If you are going to run SIGFRIED (see section 4), save these two-dimensional coordinates as a BCI2000 parameter fragment, in the format required by the ElectrodeLocations parameter. Finally, select two electrode locations that are likely to be electrocorticographically "silent," i.e., they are not near the presumed eloquent cortex, to use as an initial ground and reference (prepare the g.USBamps by patching the reference to the blue sockets, and ground to the yellow sockets, on the extreme right of each unit).
2. Hardware and Software Setup
- Ensure that the computer specifications are adequate for handling the processing requirements of the experiment. A multi-core processor will likely be necessary to accommodate the demands of real-time data acquisition and processing, video recording, and other necessary tasks. For recording and real-time analysis of 128 channels at 1200 Hz, we use a 3-GHz quad-core machine with 4 GB of RAM. The amplifiers should be connected to a dedicated USB controller, distinct from the controller(s) used by other bandwidth-hungry peripherals, such as external drives and cameras (this can be verified via the system's Device Manager). Finally, there must be sufficient disk space to store up to 5 MB per second of experimental data, and a system for archiving and backing it up.
- Set up the research equipment (amplifiers, computer, experimenter's screen, keyboard, speakers, microphone and camera) on a single trolley, which can be quickly rolled in and out of the patient's room, with only a single power cord to plug into the wall. To move the computer from room to room, use the Hibernate function before unplugging. The patient's video screen should be on a separate tray table or monitor arm. Considering that the patient is prone to seizures, make sure that all the equipment can be rolled out of the way quickly in case medical personnel need immediate access to the patient. The equipment should also be disinfected with antiseptic wipes before and after use in the patient's room.
- Time with the patient is limited, and all procedures need to be robust and optimized to make best use of that time. In this regard, the flexibility and robustness of BCI2000 are invaluable characteristics. Ensure that the experiments can be launched at the touch of a button. In the case of BCI2000, use a batch file to launch the right combination of BCI2000 modules automatically, with the required command-line options. The Operator and gUSBampSource modules are required, along with the appropriate SignalProcessing and Application modules for your particular experiment. Use BCI2000's Operator scripting feature to ensure that all the required parameter files are loaded automatically-including any that are specific to this patient, such as the number of electrodes and their names and positions. The purpose of this automation is to minimize the number of manual steps by the experimenter, and thus the opportunities for error. The software and its parameters need to have been finalized and tested (perhaps with an EEG subject) at least one or two weeks before implantation. It is also highly advisable to perform a "dry" run the day before the first experimental session, including all the new patient-specific parameters.
3. Experimental Session Set-up
- Choose your moment for suggesting experimental recordings to the patient, giving them notice earlier in the day, and again 15 minutes before you start. Work around visitors, meals, naps, medical procedures, and the patient's physical, emotional and cognitive state. It is important to establish a rapport with medical personnel on the floor, to help in optimizing the timing and duration of recordings.
- Wheel the equipment into place, connect to the power outlet, turn on the subject's video screen and connect it to the computer, and un-hibernate the computer.
- Launch BCI2000. With the VisualizeSource parameter enabled, press Set Config. The signal viewer opens, letting you assess the ECoG signal quality. Right-click on the viewer and set the high-pass filter to a 5 Hz cutoff. (This filter setting will only affect visualization, and not collection of data.)
- Check for interference from power line noise: Does activating a notch filter in the viewer (at 50 Hz or 60 Hz, depending on which country you are in) make a big difference to the signal? If so, try to reduce this by removing any unused cross-talking cables, or identifying and removing other sources of power interference. Change the electrodes used for reference and ground if necessary.
- If you are using an eye-tracker, calibrate it using the calibration software provided by the manufacturer. The BCI2000 source module should be compiled with the EyetrackerLogger extension included, and should be launched with the --LogEyetracker=1 flag enabled, so that eye-tracking data can be acquired in synch with the ECoG signals.
- To avoid distractions and interruptions, and to minimize possible signal interference, ensure that TVs, radios and mobile phones are turned off.
- Give precise instructions to the patient for the experiment you are about to run. Depending on the subject's task, prepared Powerpoint slides that show the task, the suggested posture, etc., can prove useful.
- Press Start on the Operator to start the experiment. Each time you press Start or Resume, a new file will be created to avoid overwriting previous data, and the file will be initialized with a copy of all the parameter values. Raw data will then be streamed automatically to the file, along with event markers, until you press Suspend or the experimental run finishes.
- Throughout the session, monitor the patient's behavior and the ECoG signals for suspected seizures, and be ready to respond to instructions from medical staff.
4. Example Experimental Session: SIGFRIED Clinical Mapping with BCI2000
- Preparation: Before the session starts, you will need to have prepared a model.ini file that contains the signal-processing settings SIGFRIED will use to build a model, and a .prm file (or separate .prm fragments) containing the BCI2000 parameters that the SigfriedSigProc module will use for real-time visualization. Two key parameters are ElectrodeLocations, specifying the 2-D layout you have chosen for this patient's particular electrodes, and ElectrodeCondition, which specifies which different tasks will be mapped under which conditions. In this example, we are using the simple StimulusPresentation module for communicating instructions to the patient, so the Stimuli parameter also needs to be adapted to the tasks we intend to run.
- Baseline Step: Start the gUSBampSource, DummySignalProcessing and StimulusPresentationTask modules, configured to sample ECoG activity from all grids and strips at 1200Hz, high-pass-filtered at 0.1 Hz. Instruct the subject to relax and remain motionless with eyes open. Record 6 minutes of baseline activity, under comfortable illumination in a quiet environment.
- Modeling Step: Start the data2model_gui tool and extract features in 5 Hz bins from 70 to 110 Hz using maximum entropy method for every 500 ms of data. Press Build Model to build a probabilistic model of the selected spectral features using Gaussian mixtures.
- Mapping Step: Start the gUSBampSource, SigfriedSigProcLAVA and StimulusPresentationTask modules and configure the Operator to load the probabilistic model, the cortical model, and the 2- and 3-dimensional electrode coordinates. After instructing the subject, start the mapping process. In this process, a subject will perform each task for 10 seconds at a time, on each of 5 repetitions. During each task, SIGFRIED detects task-related ECoG activity that is presented in continuously updated 2- and 3-dimensional maps of eloquent cortex. In the 2-dimensional maps, the size and redness of each circle represents its importance in this particular task. Specifically, the size of each circle is proportional to the fraction of the total signal variance in the gamma band that is accounted for by the task. This statistic is known as the coefficient of determination, or r2. It is in the range (0,1) and in the current setup a value of 0.1 can generally be considered significant. The scaling of the circles to maximum r2 values can be controlled using the sliders (see Figure 1C). In the 3-dimensional maps, the r2 values are mapped to different colors rather than circle sizes.
5. Representative Results
Figure 1 shows representative results, from one SIGFRIED mapping session in one patient. The patient was a 28-year-old right-handed female who had intractable localization-related epilepsy of left-temporal onset with secondary generalization. 120 electrocorticographic electrodes were implanted subdurally over left frontal, parietal and temporal cortex. A lateral x-ray (panel A) and an intra-operative photograph (panel B) depict the configuration of one frontal grid with 40 electrodes, one higher-density temporal grid with 68 electrodes, and three strips each of 4 electrodes. From the recorded seizures, a neurologist localized the epileptic foci and determined that it was necessary to perform surgical resection of the left temporal lobe while sparing eloquent language cortex. This was performed successfully: at 8 months post-resection the patient has been assessed as seizure free and without neurological deficits. The passive mapping procedure SIGFRIED identified cortex involved in language function by contrasting task-related changes during listening tasks. The results were presented in two interfaces: a 2-dimensional interface (panel C), which makes the layout of the electrodes clear, and a 3-dimensional anatomically-correct interface (panel D). From left to right the panels contrast listening to spoken language vs baseline (VOICE), listening to tones vs baseline (TONES), and listening to spoken language vs listening to tones (LANGUAGE). The last of these is included as a rough picture of auditory function that is specific to receptive language. The results of the VOICE condition showed good agreement with locations at which ECS disrupted receptive language function in this patient (marked as yellow circles in panel A).
Figure 1. Example results from one patient. Panel A shows a lateral x-ray. Yellow circles mark the electrodes implicated in receptive language, as subsequently identified by electrocortical stimulation mapping. Panel B is a photograph taken during implantation. Panel C shows the SIGFRIED mapping results in a schematic two-dimensional layout: the size and redness of each disc represents the significance of the involvement of each electrode in the task, relative to baseline. In panel D, the same statistic is mapped to color on a three-dimensional brain model rendered from the patient's MRI.
Gathering ECoG data for research requires close cooperation between clinicians and researchers, with a highly multi-disciplinary team solving problems in clinical neurology, neurosurgery, basic neuroscience, computer science and electrical engineering. The reward is that ECoG signals, and in particular amplitudes in the high gamma frequency range (70-110Hz), are highly valuable. Not only do they provide scientific insight into the neural correlates of cognitive, sensory and motor processes1-4 at a both high spatial and temporal resolution, but brain-computer interfacing studies in ECoG have also shown the method's great promise as a basis for neuroprosthetic applications6,7,10.
The open-source BCI2000 software platform8,9 provides a flexible toolkit for recording ECoG and processing the data in real-time, for all such research and engineering efforts. One specific real-time application based on BCI2000, SIGFRIED10, demonstrates that ECoG recordings are also valuable for functional mapping, showing substantial concurrence with the results derived using electrocortical stimulation mapping.
Despite the rapidly increasing interest in ECoG-based research, it is still in its infancy. The large majority of all ECoG studies to date have occurred in human epilepsy patients, and thus have been conducted in a context that imposes many limitations on research: electrode placement and duration are defined by clinical and not research needs; subjects that receive implants may have atypical brain activity, especially in the region where the electrodes are placed; and studies must use electrode technology that is several years behind the cutting edge of biomedical engineering (since the electrodes and equipment must have gone through a long approval process for clinical use). However, with continued development of miniaturized, higher-resolution, biocompatible, and fully-implantable ECoG systems, the next few years will certainly see continued adoption of this technique in basic and applied neuroscience in both human and animal models.
No conflicts of interest declared.
This work was made possible by grants supported by the US Army Research Office (W911NF-07-1-0415 (GS), W911NF-08-1-0216 (GS)) and the NIH/NIBIB (EB006356 (GS) and EB00856 (JRW and GS)). The authors thank Sean Austin for the SigfriedSigProcLAVA module, and Griffin Milsap for related technical assistance.
- Miller, K. J. Spectral Changes in Cortical Surface Potentials during Motor Movement. Journal of Neuroscience. 27, 2424-2424 (2007).
- Chang, E. F. Categorical speech representation in human superior temporal gyrus. Nature Neuroscience. 13, 1428-1428 (2010).
- Gunduz, A. Neural correlates of visual-spatial attention in electrocorticographic signals in humans. Frontiers in Human Neuroscience. 5, (2011).
- Pei, X. Spatiotemporal dynamics of electrocorticographic high gamma activity during overt and covert word repetition. NeuroImage. 54, 2960 (2010).
- Crone, N. E. High-frequency gamma oscillations and human brain mapping with electrocorticography. Progress in Brain Research. 159, 275 (2006).
- Brunner, P. Rapid communication with a "P300" matrix speller using electrocorticographic signals (ECoG). Frontiers in Neuroprosthetics. 5, (2010).
- Leuthardt, E. C. A brain-computer interface using electrocorticographic signals in humans. Journal of Neural Engineering. 1, (2004).
- Schalk, G. BCI2000: A General-Purpose Brain-Computer Interface (BCI) System. IEEE Transactions in Biomedical Engineering. 51, 1034 (2004).
- Schalk, G., Mellinger, J. A Practical Guide to Brain-Computer Interfacing with BCI2000. Springer. London. (2010).
- Brunner, P. A practical procedure for real-time functional mapping of eloquent cortex using electrocorticographic signals in humans. Epilepsy and Behavior. 15, 278 (2009).