By Casey Weltzin, Product Manager, Embedded Software, National Instruments
In today’s world, you need refine ideas quickly without being impeded by the design. A combination of high-level software design tools and off-the-shelf FPGA-based hardware can help remove these barriers and bring innovative ideas to life quickly.
By performing some OCT signal processing operations on FPGA hardware, Santec was able to improve the performance of their swept-spectrum scanner while reducing overall solution size.
Modern imaging techniques, including magnetic resonance imaging (MRI) and computed tomography (CT) scans, help medical professionals diagnose health issues quickly and accurately. Still, a tremendous amount of research is being poured into improving the quality of images produced and developing new techniques that are safer, faster, higher resolution, and more cost effective. One notable technique increasingly used is optical coherence tomography (OCT), which can produce three-dimensional scans of medical tissue (such as the surface of the eye) without emitting dangerous ionizing radiation or requiring advance preparation of the patient.
Despite the growing investment in research for these technologies, limitations still remain. In the case of OCT, a significant amount of data processing is required to produce a useful image from raw light reflection data. Therefore, truly live imaging is only typically possible on very limited data sets, such as 2D planes. More detailed 3D scans require collecting and storing reflection data and then processing that data post-hoc to form an image. The sheer amount of data prevents typical off-the-shelf computing platforms from performing the on-the-fly computations required for real-time imaging. Ultimately, this prevents live interaction by medical professionals that can be helpful as they seek to visualize certain structures or areas of interest. For example, live imaging data may provide insight into sub-surface cancer cells, or enable monitoring of incisions during a surgery.
The good news is that scientists and engineers, aided by the latest design tools and FPGA hardware, are producing breakthroughs which promise to make live, affordable 3D OCT imaging and other techniques commercially feasible.
A brief overview of OCT imaging
OCT uses a low-power light source and the corresponding light reflections to create images – a method similar to ultrasound, but which uses light instead of sound. When the light beam is projected into a sample, much of the light is scattered, but a small amount reflects as a collimated beam, which can be detected and compared with a reference beam to create an image.
The technique above is referred to as time domain OCT, and machines that vary both the X & Y positions of the light source and the reference mirror distance can combine pixel values to create a 3D OCT image after processing. Other more sophisticated OCT systems can be built using frequency domain methods, where simultaneous pixel values at different sample depths can be obtained in parallel without requiring the movement of a reference mirror. These frequency domain OCT systems can greatly reduce imaging times while improving image resolution.
OCT imaging relies on the interference of light reflected from a sample and reference mirror to produce an image.
Taking advantage of FPGA technology
Processing raw OCT interference signals requires high-speed signal processing and often involves many parallel data channels because live OCT systems need to produce an array of pixels simultaneously. Therefore, it can be advantageous to perform some of this processing directly on dedicated hardware. One approach to implementing custom logic for innovative OCT designs is to create an application-specific integrated circuit (ASIC), but this requires both manufacturing lead times and a non-recurring engineering (NRE) cost that can be well upwards of $100k depending on the design complexity.
An alternative is Field Programmable Gate Array (FPGA) technology, which combines the low latency and parallel processing advantages of an ASIC with the programmability of software-based devices such as CPUs. Since FPGAs are mass produced by vendors, their per-unit cost for research applications or small to medium deployments is significantly smaller than with ASICs. And, since FPGAs are reconfigurable through software, mistakes are much less expensive and designs can be quickly iterated.
One such company using FPGA technology for OCT imaging is Santec Corporation, which recently created a portable swept-source OCT scanner based on frequency domain analysis techniques. While previous generations of their OCT system used only PC processing and were capable of only generating 10 frames per second, moving the FFTs, interpolation and dc offset calculations to an FPGA delivered a four-fold increase in performace, as well as a significant reduction in the overall system size.
NI FlexRIO modules feature customizable I/O adapter modules, a user-programmable onboard FPGA, and a PCIe interface that enables peer-to-peer communication between boards or data transfer to a controller via DMA.
Although programmable logic can reduce the upfront cost associated with hardware design and enable faster turnarounds for sequential design versions, it can often come with the additional expense of added headcount as design engineers familiar with hardware definition languages (HDL) must be involved. Furthermore, hardware engineers must often create custom PCBs to connect FPGAs with A/D converters, bus transceivers, and other digital components. In the case of a multi-channel OCT system, building this hardware while ensuring synchronization between channels can be a daunting task.
Reducing design costs and shortening time to market
One approach to solving these challenges is taking advantage of an off-the-shelf FPGA-based system such as the NI FlexRIO, which combines a CompactPCI-based (PXI) I/O module with onboard FPGA and a customizable front end for high-bandwidth A/D conversion, high-speed DIO, custom triggering, and other operations. Since FlexRIO is modular, it can be combined with other instruments in a chassis or upgraded, with a larger FPGA for example, as needed.
FlexRIO is programmable with LabVIEW graphical system design software. LabVIEW abstracts key challenges such as the low-level details of common signal processing operations, CPU communication and data transfer, and streaming high-bandwidth data between multiple FPGAs. In the end, this means a shorter time from concept to research prototype and ultimately to commercializing innovative technologies such as advanced medical imaging systems.
Even with FPGA-based hardware, intensive floating point and other operations are often best suited for execution on a CPU. Therefore, a system architecture composed of multiple processing elements that integrate with I/O is advantageous when building high-performance systems for applications such as medical imaging, while still preserving flexibility for iterative design changes and encouraging hardware reuse across research projects. In the case of the FlexRIO, designers can combine multiple modules with a multicore PXI embedded controller, and use the FPGAs for high-throughput parallel processing and data reduction before sending the processed data to memory through DMA for visualization and analysis on the CPU. And, since the same LabVIEW graphical design software can be used to program both the FPGA and CPU applications, small teams of scientists and engineers can quickly move algorithms between processing elements to solve complex challenges.
Using LabVIEW, researchers, scientists, and engineers can efficiently implement custom logic on FPGA hardware without prior HDL expertise.
Application focus: live 3D OCT for patient diagnosis
Researchers lead by Dr. Kohji Ohbayashi at Kitasato University in Japan recently created the world’s first real-time 3D OCT system by leveraging off-the-shelf FlexRIO hardware and LabVIEW graphical system design software. In the system, 20 FlexRIO modules preprocess interference data simultaneously, and then pass the data to two additional modules, which perform a combined 700,000 512-point FFTs every second in order to generate the final intensity values. Each FlexRIO module is capable of transferring data at up to 700 MB/s through a dedicated x4 PCIe link. The current 320-channel system is capable of scanning axial (depth) data at a rate of 10 MHz and producing 12 volumes per second.
The world’s first 3D OCT system, created by Dr. Ohbayashi and team at Kitasato University in Japan, uses 20 FPGA-based FlexRIO modules.
While previous 3D OCT prototypes produced by the research group were capable of producing volumetric movies, the large amount of data processing limited the maximum video length to 2.5 seconds, and required roughly 3 hours to render that video. Now, using FPGA technology OCT volumes can be rendered continuously, enabling detection of early stage cancer and other conditions.
Eliminating barriers to medical imaging innovation
As medical imaging technologies including OCT are refined in the future and new diagnostic techniques are explored, it is critical that engineers and scientists that are part of small, focused teams are able to refine designs quickly without being impeded by the design tools they are using. As evidenced by Dr. Ohbayashi’s team at Kitsato University, using a combination of high-level software design tools and off-the-shelf FPGA-based hardware can help remove these barriers and bring innovative ideas to life in a fraction of the time as compared with traditional design tools and custom hardware.