Topographical brain electrical activity mapping on an IBM-compatible personal computer

Topographical brain electrical activity mapping on an IBM-compatible personal computer

Topographical brain electrical activity mapping on an IBM-compatible personal computer P.J. McCullagh and R.J. McClelland Department Road, of Mental ...

565KB Sizes 0 Downloads 38 Views

Topographical brain electrical activity mapping on an IBM-compatible personal computer P.J. McCullagh and R.J. McClelland Department Road,

of Mental

Belfast

Received June

Health, Queen’s

University

of Belfast,

Whitla

Medical

Building,

97 L&urn

BT9 7BL, UK 1988, accepted

September

1988

ABSTRACT A new system for computing brain electrical activity maps on a standard IBM-compatible computer has been developed. The EEG is recorded using a CEDI401 intelligent laboratory interface and stored in the computer; colour coded maps are generated using software developed in Turbo PASCAL and displayed on the EGA graphics screen. An acceptable computation time of 1.2 s for a 64 x 64 map displayed ar a 128 x 128pixel image has been achieved by incorporating assembly language routines and a maths coprocessor. The system may be readily upgraded as improved hardware becomes available andfurther software can be added. In addition to triggering auditory, visual and somatosenrory stimulators, it provides the potential for the generation of complex stimuli for cognitive experiments by means of mass RAM and digital-to-analogue converters. Keywords:

Topographical

mapping,

EEG, evoked potential,

software

INTRODUCTION Multichannel recording of the electrical activity of the brain has enabled topographical analyses to be studied for many years’ usually by the construction of isopotential contours *. Indeed the spatial distribution ofEEG was first studied by Walter and Shipton using an analogue instrument, ‘Topsy’. It is only in the last five years, however, that technology has advanced to such a degree that colour mapping, introduced by Duffy4, has become feasible in both research and clinical departments. Brain Electrical Activity Mapping (BEAM) has already been used to examine the spatial distribution of auditory, visual and somatosensory evoked potentials and EEG frequent bands. it has been employed in the study of dyslexia Y and schizophrenia6 and has application in the assessment of drugs7. The technique is important because it yields images of brain function in real time. Its clinical efficacy is however still the subject of some debate and the American Electroencephalographic Society’ has recently issued a cautionary statement on the ‘widespread’ misuse of the technique. As computer hardware falls in price, mapping systems are becoming less expensive. However, commerical mapping still constitutes a major investment, beyond the budgets of many small departments. In addition, these systems often have limitations as research tools; they record only standard evoked potential and use only EEG spectral analysis tests. We have developed a flexible mapping system (Figure I) based on an IBM-compatible personal computer (Research Machines Ltd Nimbus AX) and a CED 140 1 intelligent laboratory interface (Cambridge Electronic Design Ltd). It enables the Correspondence

and reprint

requests

Dr Paul J. McCullagh

0 1989 Butterworth & Co (Publishers) 0141-5425/89/020137~n4 $03.00

Figure

1 Brain mapping system showing Nimbus AX computer, CED1401 interface, GRASS amplifiers and GRASS Audiometer

collection of evoked responses and EEG spectra data but also has potential for the presentation of the more sophisticated stimuli used in cognitive tests; it is envisaged that this is an area where mapping may be of considerable benefit. The modular approach permits a rapid system upgrade as more powerful computers become available. It also enables analysis to be performed on a computer separate from the data acquisition system. This is convenient where the data must be analysed away from the clinical environment.

HARDWARE The hardware comprises GRASS Model 12 Neurodata Acquisition System, CED 1401, and Nimbus AX computer (Figure 2). The Model 12 consists of a 16-channel headbox, electrode selector, amplifiers and filters. Amplified EEG signals become inputs to

Ltd J. Biomed.

Eng. 1989. Vol. 1 I, March

137

Brain mapping: P.J. McCullagh and R.J. McClelland

Epson printer

nimbus RX neurodata acquisition

Eizo colour monitor Figure

2

Schematic

amplifiers filters diagram

of mapping

system

the 16-channel, 12 bit AD converter of the CED 140 1. Controlling software samples the EEG and stores digitalized data in memory, from where it can be saved on disk. Data acquisition is controlled by a 6502 &bit microprocessor in the interface, enabling peri-stimulus sampling rates of up to 20 kHz. The peripheral also incorporates mass RAM (up to 8 MByte), four DA converters for stimulus generation, 24 digital input/output lines for controlling peripherals, five event inputs and six clocks. Initially the Nimbus PC microcomputer was chosen for map generation but this has been upgraded to the Nimbus AX for speed and software compatibility. The enhanced graphics adapter (EGA, 640 x 350 with 16 colours) has been used for display and a maths coprocessor has been added to enhance computation speed. For stimulus generation both GRASS model SlO audiometer and Medelec ST10 have been used, the latter incorporating auditory, visual and somatosensory options. The GRASS amplifiers may be replaced by an EEG machine provided the CED 1401 is modified to accept a f 1 V input range, the normal output of most EEG machines. Hard-copy device options are available, including colour plotters (e.g. Hewlett Packard Paintjet, Cannon PJ 1080A) and film recorders (e.g. Polaroid Palette). High quality monochrome output as a grey scale to a laser printer is another option for the publication of results.

Figure

3

projection

A 64 x 64 grid superimposed of the head for map production.

montage) from the system are marked

international

PRODUCTION

Brain electrical activity mapping creates a colour coded image of the cortical activity measured at the scalp. In order to produce the image, a rectangular grid is superimposed on a two-dimensional projection of the head (Figure 3). We have used a 64 x 64 grid and out of the 4096 locations only 16 are known, the electrode sites which have been measured; the unknown locations are computed using interpolation. A number of algorithms have been reported and we have initially selected the four nearest neighbours (4NN) method9 with distance squared because this is the easiest to implement. Using this method an unknown point is influenced by the voltages measured at the four electrodes closest to it and its distance from them (Figure 4). Weights for all locations in the array may be computed and stored in a file for subsequent map production. A number of files may be determined for different montages, electrode placements or array sizes. For each time sample in an evoked response or frequency band in the EEG, the 64 x 64 interpolated values may be computed. The value is then quantized within the range 0 to 15 and assigned a coloured

138

J. Biomcd. Eng. 1989, Vol. 11, March

10-20

Sixteen sites (banana electrode placement

P2

P4 r

c

z h

u (X&I =

MAP

on a two-dimensional

,$ i=l

'i

di2

d12 A

Figure 4 Four nearest neighbour interpolation method. Voltage at an unknown point, V(x, y), is computed from the voltages measured at the four nearest electrodes (Pl, P2, P3 and P4) and the distances from them (dl, d2, d3, and d4)

pixel (or group of pixels for larger maps). The array of pixels constitutes an image of brain function which may be more easily interpreted than a series of polygraphic recordings. A number of sequential images may be rapidly replayed to produce an animated effect, showing the spatiotemporal properties of brain electrical activity. In particular the technique is advantageous for identifying asymmetries and localizing focal brain electrical activity. As an aid to the interpretation of topographic data Duffy et al. have introduced significance probability maps in which the image represents a statistical transformation of a number of data files”. The approach has attracted criticism regarding some of the statistical assumptions” and these maps should be treated with some caution. Inter-group differences may be formed using the t-statistic and an individual

thin

may be compared to a control z-statistic. The latter is dependent matched database and automated potentially misleading12.

mapping: !‘..I. McCullagh

and R. J. McClelland

group using the upon a suitably diagnosis can be

SOFTWARE The CED signal averager package (SIGAVG) has been used for data acquisition of evoked potentials. It can record up to 16 channels of cortical data and toggle between the display of ongoing activity or average being built up on any channel. A sweep is normally rejected as containing artifact (e.g. eyeblink or movement) if more than four samples per channel are full scale, although the number of points is variable. A prestimulus window may be set which is useful as it conveys an estimate of signal to noise ratio of the evoked response. Data files may be reviewed and filtered using 3 or 5 point smoothing with cursor selected amplitudes and latencies output to a log file (ASCII format) for more detailed analysis. A spreadsheet can be setup to compute automatically inter-peak latencies and amplitudes, an otherwise time consuming and error-prone form of multichannel analysis. In addition, as a number of log files can be directly imported to SPSS-PC, analysis of variance and other statistical manipulations may be performed on group data. Peripheral support is good with options to plot waveforms to dot matrix or laser printers and to XY plotters. The mapping program has been written in Turbo PASCAL version 4, with optimized assembler routines for speed enhancement (Figure 5). The program reads the data file in the format stored by SIGAVG, comprising header block containing sampling parameters followed by 16 channels of interleaved data.

EEG I

EP

I

compute mean spectrum

time = 1

I

I

4 <

stop

)

Figure 5 Flowchart of mapping program. SIGAVG is a proprietary program supplied by Cambridge Electronic Design Ltd. Further information on non-proprietary source code is available from the authors

Figure 6 Screen layout showing auditory evoked potential traces for all 16 electrodes together with map at 203 ms post stimulus

The file of nearest neighbour weights is then read into RAM and the background display is set. This consists of the individual waveforms, line cursor with latency readout, colour coded bar with scale, head shape orientation, and textual information such as file name and reference used (Figure 6’). We have employed a balanced noncephalic reference in our recordings, from which the common average reference may be computed13. Maps may be displayed in sequence to produce the animated effect or computed selectively under cursor control. Scaling may be to maximum value giving optimum dynamic range or to a preset value for valid inter-map comparison.

DISCUSSION The time taken to compute and display each map on a standard PC was a major consideration and a prime objective was to minimize this. The program was initially written in Turbo PASCAL version 3 on the Intel 80186 based Nimbus PC and took approximately 6.5 s per map. This figure has been reduced to 1.2 s on the 80286 based Nimbus AX by a number of enhancements. The latest release of Turbo version 4 executes much faster and supports the 80287 maths coprocessor. In addition optimized assembler routines have been included for map computation and EGA display. Indeed with the new generation of 32-bit 80386 processors running at 20 MHz, incorporating high speed cache controllers and 32-bit coprocessors further significant speed improvements could be obtained without software modification, all at reasonable cost. With reduced instruction set (RISC) processors becoming available and transputer technology on the horizon, substantial increases in computing power and improved graphic standards should emerge within the next few years. Speed may not be of paramount importance to some users however and the software we have developed runs on the popular dual disk drive Amstrad PC1640 ECD at a much slower rate (approximately 8 s per map). A desirable software modification would be to update to the new IBM video graphics standard (VGA 640 x 480, 16 colours from a palette of several thousand). Thus the maps

J. Biomed. Eng. 1989, Vol. 1 I, March

139

Brain mapping: P.J. McCullagh and R.J. McClelland

could conform to any future international colour standard. The non-availability in the commerciaf sector of such a standard at present is the cause of considerable confusion in the interpretation of maps from different suppliers. Our modular software approach allows additional features to be incorporated as they are reported. In the near future we hope to include procedures for the computation of difference and statistical probability maps. New algorithms may also be added, e.g. which is thought to produce spline interpolation, more accurate maps as maxima are no longer restricted to the measurement site14. Adequacy of spatial sampling is an issue of importance from a hardware perspective. We have opted for 16 channels due to expense of amplifiers, and the difficulty in attaching more than 16 electrodes to a subject’s head in a reasonable time. A recent report suggests that map quality is preserved until the number of electrodes falls below 19 for a full head projection I5. This may necessitate the study of smaller cortical areas using a denser electrode placement I6. Replacing the GRASS amplifiers with an EEG machine with paper trace may also be necessary for recording EEG spectra in a clinical setting, as the mapping approach should complement the conventional EEG and is not a replacement for it. It is particularly important that artifact contaminated records can be eliminated and the best method of accomplishing this is a visual review of the original recording. The CED1401 includes a mass RAM and four DAconverters. This enables complex waveforms such as tone glides or speech patterns to be used as stimuli and these may be more appropriate for the study of cognitive function than simpler stimuli now in use17.

CONCLUSION Brain electrical activity mapping is a promising technique which may be used to study cortical potentials, spontaneous and evoked. This in turn may provide a handle on psychiatric conditions beyond the scope of conventional electrophysiological investigation. It has come to prominence recently due to advances in computer technology. As this technology is at present undergoing considerable improvements in processor power, graphics display and data storage and price continues to fall, we have adopted a modular approach enabling replacement of hardware and ungrading of software. This may be the most cost effective solution for the small research or clinical department, at least until clinical efficacy has been proven and definitive standards emerge. The approach is potentially attractive as many small departments already possess IBMcompatible computers and EEG amplifiers.

140

J. Biomed. Eng. 1989, Vol.

11,March

ACKNOWLEDGEMENT The authors wish Medical Illustration, with the figures.

to thank the Department of Belfast City Hospital, for help

REFERENCES 1. Etevenon

2. 3. 4.

5.

P. Applications and Perspectives of EEG Cartography. In: Duffy FH, ed. Topographical Mapping of Brain Electrical Activity. London: Butterworths, 1986; 11341. Lehmann D. Multichannel topography of human alpha EEG fields. Electroenceph Clin Neurophysiol 197 1; 31: 439-49. Walter G, Shipton HW. A new toposcopic display system. Electroenceph C&n Neurophysiol 195 1; 3 : 281-92. Duffy FH, Burchfield JL, Lombroso CT. Brain Electrical Activity Mapping (BEAM): A method for extending the clinical utility of EEG and evoked potential data. Ann Neural 1979; 5: 309-21. Duffy FH, Dennckla MB, Bartels PH, Sandini G. Dyslexia: regional differences in brain electrical activity by topo-

graphic mapping. Ann Neural 1980; 7: 412-20. 6. Morihisa JM, Duffy FH, Wyatt RJ. Brain electrical mapping (BEAM) in schizophrenic patients. Arch Gen Psychiat 1983; 40: 719-28. 7. Itil TM, Shapiro DM, Eralp E, Akman A, Itil KZ, Garbizu C. A new brain function diagnostic unit, including the dynamic brain mapping of computer analyzed EEG, evoked potential and sleep (a new hardware/software system and its application in psychiatry and psychopharmacology). New Trends. Exp Clin Psychiat 1985; 1: 107-77. Society. Statement on 8. American Electroencephalographic clinical use of quantitative EEG. J Clin Neurophysiol 1987; 4: 75. 9. Coppola R, Buchsbaum MS, Rigal F. Computer generation of surface distribution maps of measures of brain activity. Comput Bio Med 1982; 12: 191-9. 10. Duffy FH, Bartels PH, Burchfield, JL. Significance probability mapping: an aid in the topographic analysis of brain electrical activity. Electroenceph Clin Neurophysiol 198 1; 51: 45542. 11. Oken BS, Chiappa KH. Statistical issues concerning computerized analysis of brainwave topography. Ann Neural 1986; 19: 4934. 12. Rodin EA. Computer assisted clinical neurophysiology - the role of the technologist. J Electrophysiol Technol 1988; 14: 91-107. 13. Lehmann D. Spatial analysis of EEG and evoked potential data. In: Duffy FH ed. Topographical Mapping of Brain Electrical Activity. London: Butterworths, 1986; 2!+62. 14. Perrin F, Pernier J, Bertrand 0, Giard MH, Echallier JF. Mapping of scalp potentials by surface spline interpolation. Electroenceph Clin Neurophysiol 1987 ; 66 : 75-8 1. 15. Kahn EM, Weiner RD, Brenner RP, Coppola R. Topographic maps of brain electrical activity - pitfalls and precautions. Bio Psychiut 1988; 23: 628-36. 16. Desmedt JE, Nguyen TH, Bourguet M. Bit-mapped color imaging of human evoked potentials with reference to the N20, P22, P27 and N30 somatosensory responses. Electroenceph Clin Neurophysiol 1987; 68: 1-19. 17. Lovrich D, Novick, B, Vaughan HG. Topographic analysis of auditory event-related potentials associated with acoustic and semantic processing. Electroenceph Clin Neurophysiol 1988; 71: 40-54.