Researchers in Japan recently used optical coherence tomography (OCT) imaging, high speed acquisition, and FPGAs to create the world’s first real-time 3D OCT imaging system with the goal to advance cancer research. The team combined 320 channels, 22 FPGAs, peer-to-peer streaming, and GPUs to achieve real-time 3D OCT imaging, using graphical system design with LabVIEW software, the PXI platform, and NI FlexRIO FPGA hardware to achieve their goal. Further, to achieve real-time imaging, the two primary processing FPGAs in the system compute over 700,000 FFTs every second.
OCT is a noninvasive imaging technique that provides subsurface, cross-sectional images of materials. Interest in OCT technology continues to grow because it provides much greater resolution than other imaging techniques such as magnetic resonance imaging (MRI) or positron emission tomography (PET). Additionally, the method does not require much preparation and is extremely safe for the patient because it uses low laser outputs and does not require ionizing radiation. OCT uses a low-power light source and the corresponding light reflections to create images – a method similar to ultrasound, but it measures 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 used to create an image.
The team’s first-generation system was developed around 32 NI PXI-5105 high-density 8-channel digitizers, capturing data to the digitizer’s onboard memory, then transferring it to a PC for processing and visualization the data. While they could capture volumetric OCT videos with this system, the massive amount of data acquired by all channels simultaneously meant they were limited by the onboard memory of the digitizers. Overall, the duration of an OCT video was limited to about 2.5 seconds. After transferring the data to the PC, they still required about three hours to fully process and render the 3D video data. In the end, real-time optical biopsy (a primary goal for endoscopic OCT) was not possible with this system. This limitation was the primary driver to upgrade of the data acquisition system to enable real-time processing.
Real-time processing with FPGAs
The team built the 320-channel data acquisition system around NI FlexRIO modular FPGA hardware programmed with the NI LabVIEW FPGA Module, a graphical design language that can be used to design the FPGA circuitry without needing to know VHDL coding. NI FlexRIO combines interchangeable, customizable I/O adapter modules with a user-programmable FPGA module in a PXI or PXI Express chassis. The FPGAs enabled implementation of processing algorithms in hardware, so they achieved significant increases in processing performance by moving portions of the code from the PC to the FPGA.
The figure below shows a diagram of the data acquisition system. For high-speed acquisition, they used the NI 5751 adapter module, which has a 50 MS/s sample rate on 16 simultaneous channels with 14-bit resolution. The adapter module interfaces to the NI PXIe-7962R FPGA module to perform the first stage of processing – subtraction of the sample-cut noise and multiplication of a window function. In total, they have 20 of these modules across two PXI Express chassis, so they use two NI PXIe-6674T timing and synchronization modules to distribute clocks for the system and assure precise phase synchronization across all the channels in the system.
Figure 1. Diagram of the data acquisition system
The application required the high data throughput of the PCI Express bus. Using the x4 PCI Express interface of the PXI Express modules, the team can sustain data throughput over 700 MB/s. However, they also use the PCI Express architecture to achieve point-to-point communication between different instruments connected to the bus over direct DMA, without having to send data through the host processor or memory. Specifically, they stream data between NI FlexRIO FPGA modules without going through the host PC, which was a requirement to be able to achieve real-time imaging. While this is normally a complex development task, they used the NI peer-to-peer (P2P) streaming API to connect multiple FPGAs in the system without worrying about the low-level implementation. Instead, they focused their expertise on the FPGA algorithms that determine the imaging performance of the system.
Using P2P streaming, the team streams the preprocessed data on the NI PXIe-7962R FPGA modules to two NI PXIe-7965R FPGA modules, which are built around the Virtex 5 SX95 FPGA. These FPGAs contain a large number of digital signal processing (DSP) slices to optimize them for signal processing, so they were used for the intense fast Fourier transform (FFT) processing. To achieve 3D imaging capabilities, the two FPGAs in the system computed more than 700,000 512-point FFTs every second.
Using LabVIEW to integrate and control the different parts of the system, the team transferred data over a high-speed MXI-Express fiber-optic interface from the PXI system to a quad-core Dell Precision T7500 PC with an NVIDIA Quadro FX 3800 Graphics Processing Unit (GPU) to perform real-time 3D rendering and display. Because their goal was to achieve a 12 volume/s volume rate, they needed an overall data rate back to the PC of a little more than 500 MB/s. They also needed to log data for extended time periods for applicability to group screening tests for cancer. While the architecture does not limit the image acquisition time, they enabled logging of up to 100 minutes on the prototype system by storing data to the NI HDD-8264 RAID system, which provided 3 TB of hard drive space.
A photograph of the system is shown in the figure below. The left-hand rack contains the bank of photoreceivers and the right-hand rack is the data acquisition system. The two PXI chassis are in the center of the rack, while signal breakout boxes are above and below. The DELL PC is on the floor at the bottom left.
Figure 2. Photograph of the data acquisition system
Overall, the team designed the system with three different real-time display modes: (a) continuous display of rendered 3D images, (b) continuous 2D cross-sectional frame scanning in a 3D cube along each of the axes, and (c) continuous display of all acquired B-scan images.
The figure below shows an example of a continuously rendered 3D display. The sample is showing the skin of a human finger. The rendered images are continuously refreshed and the viewing direction can be changed arbitrarily in real time. The first image shows the finger print pattern clearly while the second shows the sweat glands. Using this system it is possible to observe the sweat glands changing in real time.
Figure 3. Real-time rendered 3D images of finger skin
showing the fingerprint (top) and the sweat glands (bottom).
Conclusion Overall, the team leveraged the flexibility and scalability of the PXI platform and NI FlexRIO to develop the world’s first real-time 3D OCT imaging system. They used LabVIEW to program, integrate, and control the different parts of the system, combining high-channel-count acquisition with FPGA and GPU processing for real-time computation, rendering, and display.
Using FPGA-based processing enabled by NI FlexRIO, they computed more than 700,000 512-point FFTs every second to achieve 3D imaging, while maintaining high channel density for the 320-channel system. They used high-throughput data transfers over PCI Express, accurate timing and synchronization of multiple modules, and “peer-to-peer data streams” to transfer data directly between FPGA modules without going to the host. They were also able to maintain a high-throughput connection between the I/O and the GPU processing in the host PC, as well as to integrate RAID hardware for extended image data logging.