Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Customer Solutions

Creating a Magnetic Imaging System for Diagnosing Infant Brain Activity Based on NI PXI and LabVIEW

Author(s):

Christopher G. Atwood, Tristan Technologies, Inc.

Industry:

Life Science, Research

Product:

LabVIEW, PXI/CompactPCI

The Challenge:

Developing a noninvasive magnetic imaging system to spatially and temporally map the magnetic fields generated by brain activity in infants at severe risk of developing cerebral palsy and epilepsy, so that medical doctors can intervene at an early stage.

The Solution:

Creating an adaptable, high-speed, high-channel-count National Instruments PXI data acquisition system, transferring the live data to a remote controller with an NI MXI-3 bus, and processing the data with software based on NI LabVIEW.


image
Continuous Data Projected onto Head Surface (left), and Averaged Data as Frequency vs. Time for All Channels (right)

Brain Imaging Challenges

Cerebral activity involves a complex pattern of electric currents that flow through neurons of the brain, rapidly moving among the different brain regions and changing with time. These currents generate exceedingly weak magnetic fields of only a few tens of femtotesla, or about 10 orders of magnitude weaker than the Earth’s field. We were challenged by a world-renowned brain researcher to affordably build a machine that would measure and map these weak fields within a sea of overwhelming magnetic noise in a hospital environment. No existing technology could solve this problem. We are a custom manufacturer of systems using superconducting quantum interference devices (SQUIDs), which are exquisitely sensitive to magnetic fields, and thus had the sensor engineering expertise for this prototype.

A competitor, who manufactures clinical equipment for brain imaging of adults that requires massive half-million dollar shielded rooms with multilayer, mumetal alloy walls, had software written in C that a team of six professional programmers worked on for more than 10 years. We needed to do the same data processing and data displays, and more, in less than a year, written by a single engineer with no formal software development training. We accepted the challenge because we knew we had the power of LabVIEW and the ease of NI hardware configuration.

Easy-to-Configure NI Hardware

Our mechanical engineers constructed an infant-sized headrest containing nearly 100 SQUID sensors that were cooled by liquid helium and insulated by a narrow vacuum gap. The analog signals from these sensors were then fed into a set of NI high-speed 24-bit data acquisition devices (NI PXI-4472 DSA) in a PXI chassis. We used the RTSI bus of the PXI chassis for simultaneous data acquisition across all channels, which was key to generating a successful map of brain activity. The acquired data was then continuously written to memory, using direct memory access across a fiber optic MXI-3 bus, on a remote computer for data processing. We configured the hardware and software to do basic acquisition in a matter of minutes using the free examples on ni.com.

LabVIEW Libraries Saved Development Time

The system’s data processing and data displays needed the flexibility of a research prototype, yet needed to be simple enough for clinicians to use. LabVIEW made this possible. We wrote noise reduction algorithms using the expansive library of matrix functions that come with LabVIEW, and used additional utilities from the NI Advanced Signal Processing Toolset. Using the detailed documentation and multitudinous examples, we quickly developed the software. We also directly incorporated pre-existing graphical tools for conventional digital filtering, graphical tools for wavelet building, and graphical tools for joint time-frequency analysis into our software. With all of these software components working together, we removed signal correlations among channels that were calculated to emanate external of the head volume. Furthermore, we performed synchronized averaging of repetitive stimuli. All of this dramatically lowered the noise levels so that we could directly see signals from the brain.

LabVIEW Coding Was Efficient

We needed to process and display the data during data acquisition, so that a medical doctor could intelligently perform a series of measurements by adjusting head position, and adjusting the nature of various stimuli, such as air puffs on the skin and acoustic patterns, that would affect the brain activity. This demands considerable data processing speed, but we found that an off-the-shelf dual-Xeon 2.6 GHz machine was sufficient, due to careful attention to efficient LabVIEW coding. Raw data could stream to disk at the same time, and the software was written so that, at a later time, the medical doctor could simply turn a knob to switch the source of incoming data to be either live data from the PXI chassis, saved raw data from a file, a computed simulated data stream, or nothing. Regardless of the source, data passes through the software the same way, through the noise reduction algorithms and displays. As an added benefit, we can freely install additional copies of the same software on any desktop PC for further data analysis at the doctor’s convenience, and thus, there is no need for the user to learn separate software packages.

LabVIEW Graphing Utilities Were Flexible

We creatively used the LabVIEW graphing components. For example, we used:

  • Subpanels within tabs, so that the user can rapidly toggle between displays and “release” a graph into a free-floating, resizable window, then “dock” it again. This keeps the displays organized, yet flexible.
  • Many different graph types under these tabs, to emphasize different aspects of the data
  • 3D graphing utilities to show the head and sensors together in quasi-real-time. Natural movement of the infant’s head in the head-rest sensor array was detected optically, and LabVIEW software computes and graphs the head location relative to the sensors to compensate for the movement.
  • 3D graphing utilities to display the field calculations in quasi-real-time.
  • Dynamic loading of analysis VIs, so the user can write their own algorithms and displays and call them up at will (for code editing while the main software is running, for rapid testing and evaluation).
  • Library loading of analysis routines so that clinicians can easily use the system

On November 14, 2004 at 7:44 p.m., we saw the world’s first unshielded magnetic brain signals from infants. We had succeeded.

The Future of the Imaging System

We plan to expand into related multichannel data acquisition systems. Using NI PXI hardware, we can expand and reduce the channel count as needed. With LabVIEW, we can freely move the software to other operating systems and easily swap the national language of the displays for foreign clients. Our customer now has an inexpensive, magnetic imaging system that he can soon use in clinical trials and hospitals to diagnose infants. He expects the system to directly assess the efficacy of medications and assist with surgical procedure localization.

For more information, contact:

Christopher G. Atwood

Software Manager

Tristan Technologies, Inc.

6185 Cornerstone Ct. East, Ste.106

San Diego, CA 92121

Tel: (858) 550-2794

Fax: (858) 550-2799

E-mail: atwood@tristantech.com