SUPRA: Software Defined Ultrasound Processing for Real-Time Applications - An Open Source 2D and 3D Pipeline from Beamforming to B-Mode
Research in ultrasound imaging is limited in reproducibility by two factors: First, many existing ultrasound pipelines are protected by intellectual property, rendering exchange of code difficult. Second, most pipelines are implemented in special hardware, resulting in limited flexibility of implemented processing steps on such platforms. Methods: With SUPRA we propose an open-source pipeline for fully Software Defined Ultrasound Processing for Real-time Applications to alleviate these problems. Covering all steps from beamforming to output of B-mode images, SUPRA can help improve the reproducibility of results and make modifications to the image acquisition mode accessible to the research community. We evaluate the pipeline qualitatively, quantitatively, and regarding its run-time. Results: The pipeline shows image quality comparable to a clinical system and backed by point-spread function measurements a comparable resolution. Including all processing stages of a usual ultrasound pipeline, the run-time analysis shows that it can be executed in 2D and 3D on consumer GPUs in real-time. Conclusions: Our software ultrasound pipeline opens up the research in image acquisition. Given access to ultrasound data from early stages (raw channel data, radiofrequency data) it simplifies the development in imaging. Furthermore, it tackles the reproducibility of research results, as code can be shared easily and even be executed without dedicated ultrasound hardware.READ FULL TEXT VIEW PDF
Ultrasound is one of the most frequently used imaging modality in medici...
Photoacoustic (PA) imaging systems based on clinical linear ultrasound a...
Medical ultrasound (US) is a widespread imaging modality owing its popul...
Ultrasound (US) imaging is one of the most commonly used non-invasive im...
Freehand three-dimensional ultrasound (3D-US) has gained considerable
Beamforming in ultrasound imaging has significant impact on the quality ...
The article presents the system architecture for automatic decoding of
SUPRA: Software Defined Ultrasound Processing for Real-Time Applications - An Open Source 2D and 3D Pipeline from Beamforming to B-Mode
Ultrasound (US) imaging is used in a wide variety of applications and complements modalities such as computed tomography (CT) and magnetic resonance imaging (MRI) by the information it provides and through the ways it can be used. As with MRI, Ultrasound can be used to gather anatomical, dynamical, as well as, functional information. This property combined with its uncumbersome use allow for US imaging to be used during interventions with little modifications to the surgeon’s workflow. One of the main advantages of US is its non-invasive nature, as only compressional waves with low intensity and power are used. In addition to that, the costs of ultrasound systems are low compared to CT and MRI. Finally, US imaging devices can be fully portable, allowing seamless use directly at the bedside. Because of this, there is a trend to replace MRI and especially CT with US imaging when applicable.
The image acquisition process of US can be broken down into several steps forming a pipeline.
First, an ultrasonic pulse modulated with a chosen frequency is generated in the tissue through precisely orchestrated electrical excitation of piezo transducer elements (transmit beamforming).
The echos induced by this pulse in the tissue are converted to electrical signals by the transducer elements and commonly stored digitally (receive).
After that, the signals are used to compute how they would have been received from one single line, where the data from different channels is delayed such that scattered signals from that line are intensified by constructive interference and echoes from other positions are reduced through destructive interference (receive beamforming) .
The result of this operation is called the radio frequency (RF) data, because the echos are still modulated with the transmit frequency.
Since only the scattered intensity is of interest to the user, the RF-data is demodulated (envelope detection), leaving the signal amplitude.
Before these amplitudes are shown on a screen they undergo a non-linear compression stage to match their dynamic range to the perceived dynamic range (log-compression).
Finally, the single lines that have been reconstructed and which are not necessarily parallel to each other are interpolated to create an image representing physical dimensions (scan conversion).
In current US systems, those steps are usually performed in specialized hardware, field programmable gate arrays (FPGAs), or specialized processors such as digital signal processors (DSPs). Implementations like this have been a necessity in the early years of ultrasound. With the increase of computing power available in modern workstations, there is no longer a strong need for that, especially when using GPUs to perform the numerical calculations. When implemented in separate hardware, modifications to the algorithms are hardly possible, as programming interfaces might not be available and the development for FPGAs and DSPs is highly complex and time-consuming. This makes the development of new methods cumbersome and essentially impedes research on ultrasound imaging. Especially for research applications, such limitations often lead to the utilization of frame-grabbers to allow for a retrieval of US images from clinical scanners  even in recent publications [6, 2], which is not only limiting reproducibility but also potentially hampers image quality. Problematic influences on the image quality include lossy image compression, frame rate differences between the frame-grabber and the US acquisition and lines, text and markers superimposed on the images.
There already exist some ultrasound systems, in which all of the processing already happens on GPUs, thus allowing the manufacturer of the device to implement changes to their pipeline more rapidly. Yet, as vendors protect their intellectual property, it is difficult for independent research groups to use those machines for research purposes. On the other hand, there have been efforts to give researchers access to parts of the US pipelines they employ, as for example by the PLUS toolkit. While this project is tailored to tracked and freehand 3D-ultrasound applications, it does not provide US beamforming or low-level processing capabilities. Besides the efforts around the PLUS toolkit, a group of researchers recently announced the UltraSound ToolBox for MATLAB . While this platform provides basic capabilities for beamforming and development of advanced low-level processing methodologies, it is conceptionally not directed towards the use in real-time applications, thus not being suited for many applications in computer assisted interventions.
On this basis, we try to close the gap between low-level offline ultrasound research on the one side, and the processing of already processed US images on the other. We propose an open source pipeline for 2D and 3D ultrasound imaging called SUPRA (Software defined Ultrasound Processing for Real-time Applications) that can be used to perform all computation-based steps in US and enable researchers and developers to work on all parts of the imaging process. This ranges from beamforming the raw channel data recorded by an US-system to the output of B-mode images. Thus, we hope to integrate efforts of other platforms, and also specifically provide a way towards a stronger integration of high-level processing (targeting e.g. at a specific medical image computing or computer aided intervention application) with low-level, ultrasound-specific information (e.g. raw channel or RF data). This way, SUPRA could for example be used to integrate efforts from image segmentation throughout all levels of the US processing pipeline, potentially leveraging specific first order data not considered so far.
In the following, we describe our approach towards Software Defined Ultrasound Processing for Real-time Applications (SUPRA). The framework is licensed under LGPLv3 and designed as cross-platform solution tested with both Windows and Linux/Ubuntu. It is publicly available on GitHub111https://github.com/IFL-CAMP/supra.
The term software defined ultrasound is derived from a concept called “software defined radio”. In this field of radio communication, hardware implementations of signal processing components such as filters, amplifiers and modulators are replaced by software implementations. This can help to reduce costs and simplify their development.
Our framework SUPRA follows the same concept. In addition to being fully implemented in software, all the real-time critical processing steps have been implemented in NVIDIA CUDA to achieve high throughput. Figure 1 shows a pipeline with the steps as outlined in Section 1 and highlights where the respective processing takes place. The transmit beamforming is performed on the CPU, as it is only necessary to compute the transmit parameters once for a fixed acquisition. It is important to note here that only the actual transmit and recieve steps require specific hardware with an analogue frontend, allowing for the excitation of piezo-elements in the US probe to create acoustic waves. Thus, all other steps in the pipeline (receive beamforming, envelope detection, log-compression, and scan conversion) can be fully customized in software. Since these are performed repeatedly, we implemented them in NVIDIA CUDA.
As a consequence, it is possible to execute the pipeline for 3D ultrasound on consumer graphics cards, as we show in Subsection 3.3.
Besides the aim to maximize real-time capability by parallelizing relevant parts of the ultrasound pipeline, we also considered the modularity of the pipeline as a major design goal. We achieved this by encapsulating the processing components into nodes on a data-flow graph, realized with the Intel Thread Building Blocks open source library222https://www.threadingbuildingblocks.org/. Based on this architecture, the nodes only exchange shared pointers to data containers (which may reside either on the CPU or the GPU) among each other, eliminating unnecessary memory operations.
In detail, each encapsulated node can utilize an input, provide an output, or both. On this foundation, by placing the processing steps of the US pipeline within the data-flow graph, nodes can be added, removed, or exchanged without recompiling the actual code. Besides this possibility to exchange individual parts of the pipeline, the overall pipeline can also be altered completely using the input-output mechanisms. In this way, it is for example possible to perform two differently parametrized beamforming runs in parallel on the same input data to extract different information. In a hardware-based pipeline this is not possible, while with SUPRA such considerations are limited only by the computational power.
In view of our efforts to provide a fully functional basic ultrasound beamforming and processing pipeline, the following methods are available in SUPRA:
Dynamic transmit and receive beamforming for a fully flexible scanline layout and resolution, as well as full control of acoustic wave excitations and multi-line acquisitions
Delay and sum beamforming for received raw channel data directly after analogue to digital conversion 
Envelope detection by IQ-demodulation, including frequency compounding through a bank of configurable bandpasses
Configurable log compression for target imaging dynamic range
Scan conversion in 2D and 3D, for a wide range of scan-line configurations
Graphical user interface for online-configuration and real-time visualization of received data
Configurable XML-interface for the generation of system parameters and specific imaging pipelines
In addition to the nodes that make up the core pipeline, several input and output nodes are present. Input nodes provide the interface to the actual ultrasound system hardware (i.e. hardware transmit and receive as indicated above) and are thus vendor or system-specific interface implementations. At this stage, Cephasonics ultrasound hardware (Cephasonics, Santa Clara, CA, USA) is integrated with the full pipeline for beamforming; and Ultrasonix systems (BK Ultrasound, Peabody, MA, USA) can be interfaced using the proprietary ulterius software interface. It should be noted, however, that the integration of other hardware-platforms would only require the implementation of a new input node within the data graph, providing a respective interface to the system-specific transmit and receive hardware.
Output nodes provide a way to either forward information at any stage of the overall pipeline to a dedicated interface, or provide a means to save data to a file on the hard-disk respectively. Implemented output nodes represent at this stage:
ROS bridge for interaction with robotic environments,
OpenIGTLink bridge for exchange of image and tracking data,
Storage of information as meta images (mhd) for offline use.
It is worth noting that output nodes are not limited to the last step of the pipeline, but can also be used with any intermediate data stream present in the system. Following the generic and modular software architecure, nodes for input and output can also contain other information. For the use in interventional settings, tracking information can be attached to the images. In this view, SUPRA provides generic interfaces for tracking in- and output via OpenIGTLink and as ROS messages. Additionally, there are native interfaces to Ascencion EM trackers, as well as NDI optical trackers.
The online-configuration mentioned before is realized via a generic parameter system, that enables all processing nodes to define parameters with default values and valid value ranges (continuous, discrete), where applicable. Through this parameter-system the respective nodes are notified of parameter changes and can react accordingly. The parameters can be inspected and modified during run-time by the user in the GUI, which is shown in Figure 2. Additionally, for the use in automated systems, the parameters can be accessed through a ROS service, allowing fully dynamic imaging.
To this end, in order to use the full pipeline as introduced above, a respective US system is required, providing access to the beamforming parameters and the raw data collected at channel level has to be available. However, even without this access, a user can still apply the other parts of the pipeline to harness the full control over those steps, e.g. by injecting previously acquired data into the pipeline.
Additionally, with the planned inclusion of image post-processing to SUPRA, such as speckle reduction techniques , or advanced imaging protocols like harmonic imaging  and planewave imaging , the current baseline provided by the framework will allow researchers to evaluate their methods in a more meaningful manner.
For the evaluation in this work, we employ the proposed SUPRA pipeline with a 384 channel cQuest Cicada™ from Cephasonics, CA, USA and a Cephasonics CPLA12875 transducer with center frequency, 128 elements, and pitch and work with the raw channel data collected by this system. For this transducer only 64 channels can be used. The resulting images are compared qualitatively as well as quantitatively to a clinical Ultrasonix® Sonix RP US system (BK Ultrasound, Peabody, MA, USA) equipped with a L14-5/38 linear transducer (128 elements, pitch). Both systems use the following parameters: frequency: , depth: . Additionally, we show acquisitions performed with a 2D matrix probe with all 384 channels of the Cephasonics interface.
For a qualitative comparison of the image quality between the two systems, we show in-vivo images of the carotid artery and the biceps tendon in combination with the brachialis of a healthy volunteer, as well as phantom data acquired with a CIRS multi purpose phantom (Model 040GSE). Figure 3 shows in the first and second row cross-sectional and longitudinal views of a common carotid artery, where images acquired with the Sonix RP are on the left and those created with SUPRA on the right. Due to tissue deformations and limited probe placement reproducibility, the anatomy shown is not exactly the same. Despite this, it can be observed, that while for the cross-section SUPRA shows less clutter noise inside the carotid than the Sonix RP, this is reversed in the longitudinal view. Apart from that, both systems show comparable tissue texture in the muscle covering the carotid, although it appears slightly less blurred with the Sonix RP. In the tendon and muscle depicted in the third row, the previous observation can also be made. The mentioned blur is likely caused by settings of the frequency compounding during envelope detection, as the filters used to separate different frequencies of the RF lines can cause blurring. Despite this potential shortcoming of SUPRA, it is necessary to point out, that the clinical system employs further processing steps after scan-conversion, such as speckle reduction, which are not implemented in SUPRA presently. In the fourth row of Figure 3 there are images of a CIRS multi purpose phantom (Model 040GSE). In contrast to the in-vivo images, here the tissue texture in the image acquired with SUPRA appears less blurred than with the Sonix RP. Additionally, the wires in the lower part of the images exhibit a higher contrast in SUPRA and seem less blurred as well. The qualitative comparison thus shows, that the image quality of SUPRA is comparable to what can be achieved with the Sonix RP.
As pointed out earlier, SUPRA is not limited to classical 2D ultrasound. It is also capable of performing all processing steps for data acquired with 3D ultrasound probes, also known as 2D array or matrix probes. Slices of a volume acquired with a Vermon matrix probe are shown in Figure 4. The probe contains an array of elements and was driven by SUPRA via a Cephasonics cQuest Cicada with 384 channels. The volume shown was acquired with depth, a frequency of and with 512 () scanlines over a field of view of . It depicts parts of the CIRS multi purpose phantom. The top-left image shows a volume slice perpendicular to all internal structures and it is clearly visible that the resolution decreases with increasing depth, as is expected for a phased array. The image in the top-right shows a 3D rendering of the volume, where the different lengths of the the hyperechoic inclusion and the wires are apparent. Bottom left shows a slice perpendicular to that, including a longitudinal view of the hyperechoic inclusion and the image in the bottom-right shows a longitudinal view of the horizontal wires. It is worth noting that the wires are longer than is visible from the slice, but due to the increasing scanline angles to the image boundaries natural to phased arrays in combination with the highly specular reflectivity of the wires, their visibility quickly falls off with distance from the center.
To complement the qualitative comparison with a quantitative evaluation of both beamformers, we estimate the point-spread functions (PSFs) of both systems, following the approach of Jeong. For this purpose, we imaged a wire target in a tank with distilled water at at different depths, while acquiring the RF data after beamforming, both for the Ultrasonix Sonix RP and SUPRA. Afterwards we performed envelope detection through the hilbert transform in a numerics software followed by a log compression to a dynamic range of .
Given the Dirac-like reflector, images representing the PSFs at depths 5, 10, 15, 20 and are retrieved. Figure 5 shows in the top row the PSFs of both systems at and . While the lateral extent of the Ultrasonix PSF is smaller than that of SUPRA combined with the Cephasonics system and probe, its height is considerably larger.
This becomes even more clear in the bottom row of Figure 5, where the lateral PSF full-width-half-maximum (FWHM) of SUPRA is larger in most depth those of the Ultrasonix system (bottom left), whereas the the axial FWHM of SUPRA is smaller for all depths.
When considering an ultrasound imaging pipeline as a linear system, the PSF characterizes the system-response to a Dirac-pulse. With that property, it also serves as one measure of imaging resolution. Considering the findings w.r.t. the PSFs of both systems, this leads to the conclusion, that the lateral resolution of the Ultrasonix pipeline (up to the beamformer) is higher than that of SUPRA with Cephasonics, while the axial resolution of SUPRA is higher.
This result only partially agrees with the observations from subsection 3.1, where a more pronounced blurring could be observed for SUPRA, even in axial direction. This difference can be explained by the fact that the qualitative evaluation takes the complete imaging pipeline into account, while the PSF evaluation only considers the pipeline up to the beamforming. Overall, however, it shows that SUPRA can provide comparable image quality, following the purely software-based approach.
In the following, we present a run-time analysis of a SUPRA pipeline consisting of beamformer, envelope detection, log compression and scan conversion. We performed this evaluation on a number of computers
Dedicated workstation with a NVIDIA GeForce GTX 1080 / (Ubuntu Linux 14.04, Intel Xeon E5 - 1660 v4, , 8 core, RAM)
Notebook with a NVIDIA GeForce GTX 960M / (Windows 10, Dell XPS 15 9550, Intel Core i7 6700 HQ, , 4 core, RAM)
Jetson TX2, an embedded SoC with a total power target of , includes a NVIDIA GPU sharing the main memory (Ubuntu Linux 16.04, ARM A57, , 4 core, RAM)
As stated before, one of the design goals of SUPRA is its interactive use, consequently limiting the run-time of all nodes of a pipeline. Table 1 shows the node and pipeline run-times we observed in milliseconds on the different hardware configurations. Note that SUPRA used previously recorded raw channel data as input for the beamforming on the Windows laptop and the ARM SoC. From this table a number of observations are noteworthy.
|Scanlines||Beamformer||Envelope||Log comp.||Scan conv.||Total|
|Jetson TX2 SoC, Integrated GPU / shared|
|2D linear||(64 / 1)|
|(64 / 2)|
|(128 / 1)|
|(128 / 2)|
|Notebook, NVIDIA GeForce GTX 960M /|
|2D linear||(64 / 1)|
|(64 / 2)|
|(128 / 1)|
|(128 / 2)|
|Dedicated workstation, NVIDIA GeForce GTX 1080 /|
|2D linear||(64 / 1)|
|(64 / 2)|
|(128 / 1)|
|(128 / 2)|
for 2D and 3D imaging (mean and standard deviation). The 2D imaging was performed in different scanline configurations ranging from 64 reconstructed scanlines without multiline receive (64 / 1) to 255 scanlines reconstructed from data of 128 transmit events (128 / 2) scanlines with depthand image resolution isotropic. The 3D pipeline was parametrized as described in subsection 3.1 ( scanlines, field of view , depth , image resolution isotropic)
The benchmarks on the NVIDIA Jetson TX2 show that a pure software 2D ultrasound pipeline can be executed on an embedded device with reasonable frame rates. This has the potential to enable mobile US-systems based on software beamforming. It can be seen, that the log compression and scan conversion nodes exhibit only limited variation for the different scanline configurations. This is caused by two circumstances: While the log compression run-time is governed by the CUDA management overhead as it performs only limited computations, the run-time of the scan-conversion depends mostly on the resolution and size of the output.
As the GPU in the tested laptop is significantly faster than that present in the Jetson TX2, it is not surprising that the node run-times are lower. On the dedicated workstation with a NVIDIA GTX 1080 it is clear that even the 2D beamforming is limited by CUDA management operations as its run-time is not influnced by the scanline configuration. The overall 2D pipeline should thus be able to perform significantly faster than .
In addition to the 2D pipeline profiled on all three machines, we executed a 3D pipeline on the dedicated workstation and measured its run-time as well. Although the number of scanlines was only twice as large as with the largest 2D pipeline, the beamforming took significantly more time. This is caused by the increased number of raw channels (384 vs. 64) and the resulting need to take those into account during beamforming. It can furthermore be observed, that the 3D scan conversion requires more time, which is caused by the addition of a whole dimension to its output. Due to the significant memory requirements and number of neccessary operations of the 3D pipeline, we did not execute it on the laptop and the Jetson TX2.
This run-time analysis is shows that a purely software based US pipeline as implemented with SUPRA can in fact be used for real-time imaging, even on commodity graphics hardware.
In this work, we introduced an open source software based ultrasound processing framework that has the potential to make fundamental ultrasound imaging research accessible. The replacement of current hardware implementations of processing pipelines with software facilitates improvements and customizations which, so far, required specialized personnel and extensive development periods. The platform allows for agile extensions and at the same time enables research by improving reproducibility. The base framework, supporting a standard processing pipeline, permits flexible developments through its modular design, such that specialized solutions can be used in place of baseline algorithms. With access to all intermediate data streams and the possibility of modifications on all stages, existing methods could be modified to include specific data that has not been considered until now.
With the performed evaluation, we demonstrate that the processing steps implemented provide image quality that is comparable to a clinical system. Additionally, the run-time analysis proves the real-time capabilities of SUPRA. It is also notable that the license under which SUPRA is distributed allows for both research and commercial oriented development. To this end, we aim at creating a community around this platform to support its future development and extension. Thus, we encourage research groups to evaluate the SUPRA framework and contribute to its growth.