Make the most of MUST, an open-source Matlab UltraSound Toolbox

Medical ultrasound imaging requires recurring use of elementary principles, namely, the choice of the transducer, the design of the emitted waves and their wavefronts (e.g. focused or wide), the demodulation of the received signals, their beamforming, and their post-processing to generate B-mode or flow images. The ultrasound signals used for research purposes can be synthetic or acquired. To make the whole pipeline easily accessible to many researchers and students, the objective was to provide an open-access toolbox, widely documented, and adapted to ultrasound imaging research involving experimental or simulation methods. The MUST Matlab UltraSound Toolbox contains algorithms that focus on the development, simulation, and analysis of ultrasound signals for medical imaging. The user can design various ultrasound-imaging scenarios and analyze their performance using simulated or acquired data. The MUST functions allow studying the characteristics of transducers and waveforms, analyze signals, and construct ultrasound images. The many examples provide a starting point for students and researchers to quickly gain an understanding of the essentials of ultrasound imaging. The simulators integrated into MUST provide very realistic acoustic pressure fields and ultrasound images. The Matlab MUST toolbox is freely available at https://www.biomecardio.com/MUST. Before engaging in advanced ultrasound techniques and comparing them with so-called standard methods, it is necessary to have a good understanding of the latter and their advantages and limitations. With this in mind, the MUST toolbox includes everything needed for comprehensive ultrasound imaging: simulators of acoustic pressure fields and backscattered RF signals, delay-and-sum beamforming, B-mode imaging, wall filtering, color or vector Doppler, speckle tracking … The documentation and open access facilitate easy and intuitive use. If the MUST toolbox proves to be interesting, the author plans to integrate advanced features depending on the demands of the ultrasound community.


I. INTRODUCTION
INCE the commercialization of research ultrasound scanners, researchers and engineers working in ultrasound imaging have access to digitized radio frequency (RF) signals. Software analysis has overtaken hardware, which has strongly contributed to the development of innovative ultrasound methods. These relate to the transmission of the waves, as well as the T his work was supported in part by the LABEX CeLyA (ANR-10-LABX-0060) of Université de Lyon, within the program "Investissements d'Avenir" (ANR-16-IDEX-0005) operated by the French National Research Agency.
D. G. (e-mail: damien.garcia@inserm.fr; garcia.damien@gmail.com) is with INSERM at CREATIS (Centre de Recherche en Acquisition et Traitement processing of the recorded echoes. Ultrasound research systems, such as Verasonics scanners, offer great flexibility for biomedical research and non-destructive testing. Figure 1 shows the number of articles referenced in Google Scholar that contain the word "Verasonics". It is apparent that testing and experimentation with such a system have quickly gained momentum, and this trend continues to grow. Terabytes of RF signals had to be acquired and digitally analyzed to produce the thousands of ultrasound images published in the literature. Before conceiving in vitro or in vivo experiments, it may be advisable to first use computational ultrasound imaging. This methodological approach enables the exploration of multiple configurations before experimental evaluation and validation. For example, it helps in implementing optimized ultrasound sequences or transducer arrays, and developing beamforming and post-processing algorithms. Since shortly, ultrasound simulations are also used to train neural networks when hundreds or thousands of in vitro or in vivo acquisitions cannot be considered. The first wide-scope simulator (Field II) was introduced by J.A. Jensen [1]. Its free access and ease of use democratized the practice of ultrasound simulations and accelerated the development of new processing methods. Subsequently, B.E. Treeby and B.T. Cox introduced the software k-Wave [2], which is also widely used by the ultrasound community. Field II, k-Wave, and the Verasonics scanners work in a MATLAB environment because of its rich repertoire of built-in functions for data analysis and processing, and image display. Once RF signals are acquired or simulated, they need to be analyzed to reconstruct interpretable images of the insonified medium, whether stationary or in motion. The processing steps typically include demodulation, beamforming, filtering, and motion detection techniques such as Doppler and speckle tracking. Although essential, these analysis techniques are sometimes not fully understood. It is uncommon for the codes to be provided by research teams after publication, which can be a barrier for students and researchers entering the field of ultrasound imaging. An attempt to address this gap was the USTB toolbox [3], which was created following the PICMUS challenge [4]. The claimed objective of the USTB was to facilitate the comparison of imaging techniques and the dissemination of research results. It mostly offers the experimental data that were downloadable during the PICMUS challenge and includes several beamforming codes. This toolbox is primarily intended for an experienced user with specific needs for comparisons of beamforming methods.
For educational purposes, and to facilitate the handling of ultrasound signals, I have developed a Matlab toolbox for ultrasound imaging called MUST. To make it easy to use, MUST is extensively documented by a website with many examples (www.biomecardio.com/MUST). The MUST toolbox contains open functions for common tasks in ultrasound imaging: emission design, demodulation, beamforming, imaging, wall filter, Doppler, speckle tracking... MUST also includes an acoustic pressure field simulator (PFIELD) and an RF echo simulator (SIMUS) to generate realistic ultrasound images. In contrast to Field II, which works in the time domain, the MUST simulators PFIELD and SIMUS operate in the Fourier domain.

II. DESCRIPTION OF MUST
The MUST toolbox enables the design of transmit sequences, RF signal simulation, post-processing and demodulation, beamforming and image generation, motion estimation, and the creation of educational figures and animations. All the functions, their description, and the examples illustrating their application are available on the MUST website ( Figure 2). The flowchart in Figure 3 shows how the MUST functions can be used in experimental or computational ultrasound imaging.    [5] to create a delay-and-sum matrix for beamforming with sparse matrixvector multiplication, SPTRACK for speckle tracking [6], [7], PFIELD and SIMUS for simulations of acoustic pressure fields and ultrasound RF signals [8]- [11]. The functions DASMTX, SPTRACK, PFIELD, and SIMUS, are briefly introduced in the next paragraphs to illustrate the functionality of MUST.

A. DASMTX -Delay-and-Sum Matrix
The function DASMTX generates a sparse matrix for delayand-sum beamforming of RF or I/Q (in-phase/quadrature) signals. Let be the RF or I/Q signal recorded by the th transducer of an -element array. If the time series are stacked in a column vector noted = [ , … , , … , ] , the beamformed signals are given by the following sparse matrix-vector multiplication:

=
, with being the DAS matrix (1) The DAS matrix can be real (when beamforming RF signals) or complex (when beamforming I/Q signals) and contains the interpolation coefficients that are used to beamform the temporal signals at specific locations. The sparsity of the matrix depends on both the number of samples in the and the interpolation scheme (nearest vs. linear vs. quadratic, etc. See equation (19) in [5]). If the ultrasound sequence (array, transmit, receive) and the beamforming point locations are kept unchanged, the matrix ( Figure 4) needs to be calculated once.

B. SPTRACK -Motion Estimation by Speckle Tracking
Speckles, resulting from interferences between backscattered echoes, are acoustic markers of the insonified tissues. In a time series of ultrasound images, these markers are sufficiently preserved from one image to the next if the frame rate is set high enough. It is then possible to follow the speckle patterns and derive the local displacements of the tissues with a frame-byframe method. A widely used approach is local block matching based on cross-correlation measures [12]. The MUST function SPTRACK computes FFT-based normalized cross-correlations [13]. To detect both large and small displacements, SPTRACK includes a coarse-to-fine multiscale approach, i.e. the displacement estimates are iteratively refined by decreasing the size of the blocks. Subpixel displacements are determined by a parabolic fitting around the cross-correlation peaks. The estimated motion field is finally smoothed with a robust unsupervised spline smoother [7], [13]. Figure 5 displays an in vitro example of a velocity field estimated by the MUST function SPTRACK with ultrafast plane-wave imaging.

C. PFIELD -Acoustic Pressure Fields
The function PFIELD (in Release 2021) simulates acoustic pressure fields radiated by a uniform linear or convex array. PFIELD works in the "conventional" coordinate system illustrated in Figure 6. PFIELD works in the frequency domain. It is based on far-field (Fraunhofer) and paraxial (Fresnel) approximations. The transducer elements are split into sub-elements along the direction to make the far-field hypothesis valid. The paraxial approximation is also applicable if there is no significant deviation from the -azimuth plane. In PFIELD, the harmonic pressure at time , for an angular frequency (wavenumber ), and at position = ( , , ), is ( , , ) = ( ) ( , )δ( , , ) .
stands for the total number of sub-elements, is the distance that separates the position from the th sub-element, and is the azimuth angle that defines the obliquity of position with respect to the th sub-element.
( ) represents the spectrum of the transmit pressure pulse. The and δ parameters relate to the directivity of a sub-element and the elevation focus, respectively. The Δ are the transmit delays, and the are the transmit apodizations. Figure 7 shows simulated acoustic pressure fields for ultrafast ultrasound imaging.

D. SIMUS -Simulation of Ultrasound RF Signals
The function SIMUS (Release 2021) simulates ultrasound RF radio-frequency signals generated by a uniform linear or convex array insonifying a medium of scatterers. SIMUS uses PFIELD and point scatterers to generate echoes. The scatterers become individual monopole sources when an incident wave reaches them. They do not interact acoustically (weak scattering assumption). Each scatterer is assigned a reflection coefficient that describes the amplitude of the backscattered wave. The pressures recorded by the transducer elements are derived from Equation (2) by using the principle of acoustic reciprocity. The mathematics inside PFIELD and SIMUS are described in detail in [10]. Figure  8 shows a cardiac three-chamber view obtained with the MUST toolbox: RF signals were simulated with SIMUS, demodulated with RF2IQ, and beamformed with DASMTX. The B-mode image was then obtained with the function BMODE (see TABLE I). III. IS MUST A MUST-HAVE? In this IUS proceeding was presented the Matlab UltraSound Toolbox MUST. It allows students, researchers, and other ultrasound imaging enthusiasts to post-process experimental RF and I/Q ultrasound data, and to simulate acoustic pressure fields and ultrasound signals emitted and received by ultrasound transducers. The MUST toolbox contains user-friendly and well-documented Matlab functions. It is 100% open-source, fast, and easy to use. Examples of MUST applications include experimental design, demodulation and beamforming, B-mode imaging, color and vector Doppler, speckle tracking, realistic simulations, etc. MUST also offers the possibility to make wave propagation and backscattering movies. The reader is invited to visit the website (www.biomecardio.com/MUST) and run the examples that illustrate the diversity of MUST. The functions of MUST have all been the subject of published scientific articles, for example with ultrafast Doppler echocardiography in volunteers with a Verasonics scanner [6], [9], [14], or for the study of vector Doppler in silico, in vitro and in vivo [8], [15]. MUST has its own simulator SIMUS, which is very easy to use. For users with the MATLAB Parallel Computing Toolbox, SIMUS can be run on a parallel pool of workers. Unlike Field II, its code is open, allowing the advanced user to make modifications or implement it with a different programming language.
The MUST toolbox will evolve according to the users' requests. It will probably include functionalities for volume ultrasound imaging with matrix ultrasound probes. The current version of MUST contains only popular techniques (e.g. DAS beamforming, autocorrelation-based Doppler, block matching by cross-correlation, wall filter by polynomial regression or SVD, etc.) If the MUST toolbox shows some success, it is likely that less classical approaches, which have proven to be successful, will be integrated into future versions. Standalone executables will also be offered to extend the outreach of MUST.
Its format and simplicity have been designed to allow the users to make the most of MUST. The usage will tell us if the MUST toolbox is a must-have, or at least a must-try, for research in ultrasound imaging.