The-Bodega: ULM Simulation Toolbox
- The-Bodega is an open-source MATLAB-based simulation toolbox for ULM that integrates hemodynamic graphs and stochastic microbubble dynamics to create ground-truth datasets.
- It combines directed vascular graphs, sequential Monte Carlo simulations, and GPU-accelerated ultrasound forward modeling to emulate physiologically realistic microvascular flows.
- The toolbox enables quantitative benchmarking of ULM algorithms by providing complete traceability from vessel architecture to time-resolved bubble trajectories across multiple anatomical domains.
Searching arXiv for the exact topic and closely related work to ground the article. The-Bodega is an open-source, MATLAB-based simulation toolbox for Ultrasound Localization Microscopy (ULM), designed to generate ground-truth datasets that mimic realistic in vivo ULM acquisitions while preserving exact knowledge of vessel architecture, microbubble positions, velocities, and hemodynamic conditions (Lee et al., 9 Sep 2025). It links a hemodynamic graph model of the microvasculature, a sequential Monte Carlo microbubble simulator, an ultrasound forward model via SIMUS3 or other simulators, and ULM processing and benchmarking tools. Its stated scope includes anatomically realistic microvascular networks, biophysically plausible blood flow and pulsatility, stochastic microbubble trajectories, and corresponding ultrasound RF/IQ data with tissue and skull clutter and motion, thereby addressing a central limitation of in vivo validation: the absence of observable “true” microbubble trajectories and vessel geometry (Lee et al., 9 Sep 2025).
1. Definition, scope, and nomenclature
The-Bodega is presented as a modular, object-oriented MATLAB framework for simulating realistic hemodynamic microvascular graphs and the microbubble and ultrasound data derived from them. Its purpose is not merely image synthesis, but the construction of truth-known digital phantoms for benchmarking localization, tracking, clutter filtering, motion correction, and functional ULM metrics under controlled but physiologically informed conditions (Lee et al., 9 Sep 2025). The framework is explicitly organ-agnostic provided that a directed vascular graph is available, and the included defaults span mouse brain cortex, human left ventricle coronary vasculature, and a synthetic capillary network.
The name is potentially ambiguous in the contemporary literature. “The-Bodega” in this sense refers specifically to the ULM simulation toolbox (Lee et al., 9 Sep 2025). It is distinct from BODEGA, a benchmark for adversarial example generation in credibility assessment and misinformation classification (Przybyła et al., 2023, Fazla et al., 30 Jun 2025), and from Bodega, a consensus protocol for local linearizable reads in distributed systems (Hu et al., 8 Sep 2025). The ULM toolbox is therefore best understood as a hemodynamic and ultrasound simulation platform rather than a text-robustness benchmark or a distributed systems protocol.
2. Hemodynamic graph formalism and microbubble dynamics
At the core of The-Bodega is a directed-graph representation of the vasculature. Nodes encode branch points, inlets, and outlets; edges encode vessel segments and are annotated with radius from .rad files, baseline flow or velocity from .flo, optional pulse pressure from .pul, and spatial coordinates from .pos (Lee et al., 9 Sep 2025). The directedness is functionally important: it enforces physiologic flow direction, avoids cycles, and enables MATLAB allpaths, so that every unique path through the network can be treated as a potential microbubble trajectory. Included defaults comprise half and whole mouse brain cortex graphs of approximately $2.1$ million nodes and $2.8$ million edges from Linninger et al., a human left ventricle coronary network from Schwarz et al., and a synthetic capillary network (Lee et al., 9 Sep 2025).
Microbubble motion is simulated with a sequential Monte Carlo procedure. The framework precomputes all plausible paths through the graph, biases trajectory sampling toward higher-flow inlets, chooses a seed point along the sampled path using a radius-based PDF, and forward-propagates each bubble with time step using precomputed steady-state velocity with pulsatile modulation and size effects (Lee et al., 9 Sep 2025). Microbubble size is sampled by default from a Definity-like distribution,
and passage through a vessel depends on bubble diameter relative to vessel radius; bubbles larger than the vessel are slowed and may shrink, disappear, or be removed entirely in very small capillaries (Lee et al., 9 Sep 2025).
The flow model combines Poiseuille assumptions with dynamic pulsatility. Within a vessel segment, the axial velocity profile is
with , and mean velocity and volumetric flow given by
Beyond steady-state flow, The-Bodega applies a modified Pulse Decomposition Analysis approach in which each edge receives a composite pulse waveform formed from five Gaussian components convolved with triangular windows, amplitude-scaled via
then time-shifted according to path length, cardiac cycle period, and effective pulse wave velocity (Lee et al., 9 Sep 2025). The resulting edge-wise pulsatile profile is periodic over cardiac cycles, and microbubble velocity is represented as
To avoid non-physical kinks in raw centerlines, trajectories are Savitzky–Golay filtered with window 5 and second order, and a Rotation Minimizing Frame is computed via the double-reflection method (Lee et al., 9 Sep 2025). This permits smooth radial displacement within vessels and yields smooth 3D trajectories. A plausible implication is that the framework is not limited to centerline occupancy models; it attempts to preserve local intraluminal geometry consistent with the assumed Poiseuille statistics.
3. From microbubble trajectories to ultrasound data
After simulation, the set of bubbles $2.8$0 is stored with attributes including position, velocity, radius, time, and trajectory ID, then subsampled into frame-wise microbubble sets and written to HDF5 with chunking and compression for efficient I/O and frame-by-frame access (Lee et al., 9 Sep 2025). This data layout is meant to support interoperability with other languages and downstream pipelines while retaining exact trajectory-level provenance.
The ultrasound forward model is centered on SIMUS3, described as a frequency-domain, particle-based simulator that works directly on 3D scatterer lists rather than a Cartesian grid, supports arbitrary transducer geometries, and is GPU-accelerated with CUDA (Lee et al., 9 Sep 2025). Microbubbles are treated as acoustic point scatterers with scattering amplitude, while skull and parenchyma are represented as scatterer clouds. The received RF signal for channel $2.8$1 is represented conceptually as
$2.8$2
and in beamformed space this is equivalent to convolution of the reflectivity map with the system PSF,
$2.8$3
The paper notes that ULM processing can explicitly use this PSF, for example by correlation-based localization with row-column arrays (Lee et al., 9 Sep 2025).
Scene construction is block-wise. A tissue or skull clutter block seeds 3D scatterers according to intensity distributions from micro-CT or B-mode; a microbubble block places scatterers at $2.8$4 positions in the field of view; additional blocks can represent separate tissue regions (Lee et al., 9 Sep 2025). Each block is simulated independently and the RF/IQ buffers are summed. Temporal and acquisition parameters are controlled by JSON transducer configuration files, including center frequency, sampling rate, aperture geometry, focusing, plane-wave settings, medium attenuation, microjitter, and scatterer density. The framework explicitly supports microbubble sampling rates up to $2.8$5 kHz, even when the ultrasound frame rate is lower, enabling subsampling and aliasing analysis (Lee et al., 9 Sep 2025). Beamforming is left to the user; the paper reports GPU-accelerated delay-and-sum, and in some row-column array examples uses autocorrelation and 3D Gaussian fitting for localization.
4. Anatomical domains and representative use cases
The-Bodega is described as organ-agnostic, but its canonical domains are the mouse brain and the human heart. The included examples show that the same pipeline is reused across these settings by changing vascular geometry and parameterization of viscosity, pressure drop, compliance, pulse wave velocity, and heart or respiratory rates, with graph-specific tuning to reproduce known in vivo flow and velocity ranges (Lee et al., 9 Sep 2025).
| Domain | Default graph or input | Representative uses |
|---|---|---|
| Mouse brain | Whole and half cortex graphs from Linninger et al. | Capillary imaging, saturation analysis, transcranial ULM, 3D dynamic ULM, neurovascular responses |
| Human heart | Left ventricle coronary network from Schwarz et al. with real B-mode short-axis acquisitions and motion fields | Myocardial ULM under motion and clutter, motion correction, clutter filtering stress-tests |
| Synthetic network | Synthetic capillary graph | Testing and checksums |
In the mouse cortex setting, the framework has been used for capillary imaging and saturation analysis on a $2.8$6 mm cortical patch with multiple microbubble concentrations, for transcranial ULM with skull clutter, for 3D dynamic ULM using row-column arrays, and for simulation of neurovascular responses in barrel field cortex (Lee et al., 9 Sep 2025). With microbubble-only data, the reported saturation behavior is that $2.8$7–$2.8$8 of large vessels are traversed in about $2.8$9 minutes, whereas only about 0 of capillaries are traversed in the same interval, consistent with in vivo observations (Lee et al., 9 Sep 2025). The study further defines weighted node importance as a linear combination of betweenness centrality and PageRank, and reports that these critical capillary nodes saturate faster, around 1–2 minutes.
In the cardiac setting, a coronary arterial graph is combined with real B-mode short-axis sequences and motion fields derived from Doppler, so that tissue scatterers and microbubbles undergo synchronized systolic and diastolic motion (Lee et al., 9 Sep 2025). This permits controlled separation of motion, clutter, and clutter filtering. The reported qualitative finding is that without motion the vasculature is reconstructed accurately; motion alone with perfect motion correction preserves much of the vasculature; but motion plus tissue clutter plus SVD leads to significant vessel loss and false tracks, indicating that clutter filtering is the dominant challenge in moving organs (Lee et al., 9 Sep 2025).
The functional ULM example uses a whole mouse brain graph co-registered to the Allen Brain Atlas, extracts barrel field masks, and defines two flow states—baseline and full whisker activation—with increased CBV and CBF inside S1BF (Lee et al., 9 Sep 2025). A stimulus train of 3 s on and 4 s off for five repeats drives a hemodynamic response function based on a simple excitatory-inhibitory neural response convolved with a gamma-variate hemodynamic impulse of FWHM about 5 s and about 6 s delay per Buxton et al. The HRF is then used as a time-varying CDF for mixture sampling between baseline and activated microbubble distributions. The reported outputs include contrast-enhanced power Doppler versus ULM density and velocity comparisons, voxel-wise Pearson correlations using a 7 s sliding window with 8 s stride, and activation maps consistent with in vivo fULM results (Lee et al., 9 Sep 2025).
5. Benchmarking ULM algorithms and methodological studies
A principal function of The-Bodega is quantitative benchmarking under full ground truth. Because both the vascular graph and the time-resolved microbubble trajectories are known, users can compute localization error as the distance between estimated 9 and true 0, assess tracking fidelity through linking correctness and fragmentation, and measure velocity estimation error relative to truth (Lee et al., 9 Sep 2025). The paper explicitly uses the toolbox to benchmark SVD spatiotemporal filtering, Fourier Ring Correlation, a TAL “Tracking-before-Localization” algorithm with Kalman filtering and radial symmetry, ULM with row-column arrays and lag-1 autocorrelation, dynamic ULM, and functional ULM.
SVD spatiotemporal filtering is described by the standard decomposition
1
with low-rank components associated with coherent tissue signals and higher-rank components with microbubbles and noise, then filtered via
2
where selected singular values are zeroed or retained (Lee et al., 9 Sep 2025). The-Bodega allows comparison of filtered reconstructions against both microbubble-only data and the ground-truth graph, using Dice, Jaccard, sensitivity, specificity, and FRC. In the cortical capillary example, two filters removing the first 3 and 4 components are compared, and more aggressive filtering produces clear capillary loss, especially in slow-flow capillaries overlapping tissue motion space.
FRC is used as a resolution estimator by correlating the Fourier transforms of two independent reconstructions and identifying the intersection with the half-bit threshold (Lee et al., 9 Sep 2025). The reported FRC-based resolutions are approximately 5 for microbubble-only data, degrading to 6 and 7 under increasingly aggressive SVD filtering. The paper interprets this as direct evidence that capillary loss reduces ULM resolution. A common misconception is that clutter filtering is a neutral preprocessing step whose only effect is tissue suppression; the examples here indicate that aggressive clutter removal can also ablate true capillary signal and therefore alter the effective operating point of the entire ULM pipeline (Lee et al., 9 Sep 2025).
6. Computational profile, assumptions, and significance
The-Bodega is engineered for large-scale simulations and automatically leverages available CPU and GPU parallelization. The reported test platform is an 8-core CPU system with 8 GB RAM and an NVIDIA RTX 3090 with 9 GB, using MATLAB parpool for edge-wise PDA and per-bubble simulations, GPU arrays for sorting and vector operations, and GPU-accelerated SIMUS for ultrasound generation (Lee et al., 9 Sep 2025). For a representative workload of 0 bubbles at 1 kHz sampling over 2 s, reported memory and runtime are about 3 GB and 4 s for the whole mouse brain cortex, 5 GB and 6 s for the half brain, 7 GB and 8 s for the human heart, and 9 GB and 0 s for the toy network (Lee et al., 9 Sep 2025). Major bottlenecks are graph allpaths computation in dense cortical graphs, edge-wise PDA pulsatility computation, and 3D ultrasound simulation with dense skull or tissue clutter. Disk I/O, particularly NVMe SSD versus HDD, materially affects runtime because bubbles and frames are stored as separate HDF5 chunks.
The framework also states its assumptions clearly. Accuracy depends on the fidelity of the underlying vascular graph and hemodynamic solution; where in vivo calibration is unavailable, approximate scaling such as Murray’s law reduces realism (Lee et al., 9 Sep 2025). Flow is modeled with laminar, cylindrical, Newtonian Poiseuille assumptions; non-Newtonian effects, red blood cell interactions, and complex rheology are not explicitly modeled. Microbubbles are passive point scatterers by default, without shell dynamics or nonlinear scattering, although integration with PROTEUS or k-Wave is noted as a route to richer physics. SIMUS is linear, so nonlinear propagation and harmonic imaging are not included in the default pipeline. Neurovascular activation is intentionally simplified, and redistribution of flow during activation is not globally rebalanced unless a full hemodynamic re-solve is performed (Lee et al., 9 Sep 2025). These constraints are substantive rather than incidental: “ground truth” here means truth-known with respect to the simulator, not direct in vivo observability.
Within those limits, the paper positions The-Bodega as the first open, modular MATLAB toolbox to couple realistic validated hemodynamic graphs, stochastic microbubble Monte Carlo simulation with Poiseuille and pulsatile flow, 3D ultrasound forward modeling, and end-to-end ULM processing and evaluation in a single framework (Lee et al., 9 Sep 2025). Its significance lies in supporting dynamic rather than static occupancy simulations, preserving full ground truth from vessel architecture to time-resolved bubble trajectories and clutter-contaminated ultrasound data, and enabling controlled studies of localization, tracking, resolution, motion compensation, and functional imaging. The same properties also make it suitable as a data engine for deep learning, since it can generate arbitrarily large annotated datasets across multiple organs and acquisition conditions (Lee et al., 9 Sep 2025).