zea.inverseΒΆ

Inverse beamforming: recover channel data from beamformed images.

The zea.inverse subpackage inverts the delay-and-sum (DAS) beamformer: it recovers pre-beamformed channel data from a post-beamformed image by expressing the beamformer as a differentiable linear operator and solving a least-squares problem β€” optionally regularized with a point-scatterer prior.

ModulesΒΆ

  • zea.inverse.operators – The DAS beamformer as a differentiable linear operator (DASOperator) and a time-domain point-scatterer simulator (ScattererSimulator).

  • zea.inverse.solvers – Matrix-free solver primitives (cgls(), linear_adjoint()).

  • zea.inverse.seeding – Scatterer seeding from a beamformed image (seed_scatterers()).

  • zea.inverse.inversion – High-level inversion drivers (invert_direct(), invert_scatterers()).

The DAS beamformer sums on the order of n_el * n_tx samples into every pixel, so inverting a single compounded image for the full channel-data cube is well-posed for data fit but severely underdetermined for recovery. invert_direct() makes this concrete by computing the minimum-norm (pseudo-inverse) solution, while invert_scatterers() regularizes the nullspace with a physical point-scatterer parameterization, which recovers channel data far better on point-target scans.

The scatterer-prior inversion follows the off-grid stochastic-optimization scatterer model of van de Schaft et al., Off-Grid Ultrasound Imaging by Stochastic Optimization (arXiv:2407.02285).

Example

import zea
from zea.inverse import DASOperator, invert_scatterers

with zea.File("path/to/scan.hdf5") as file:
    parameters = file.load_parameters(
        xlims=(-0.018, 0.018), zlims=(0.003, 0.04), pixels_per_wavelength=2
    )
    raw_data = file.data.raw_data[0, ..., 0]  # first frame, RF

operator = DASOperator(parameters)
image = operator.forward(raw_data)
result = invert_scatterers(operator, image, n_scatterers=15000, n_iter=70)
# result.channel_data is the recovered pre-beamformed data cube

For a walkthrough see the tutorials: Inverse beamforming: recovering channel data with zea.inverse (synthetic), Inverse beamforming on a CIRS phantom scan (recorded phantom scan), and Inverse beamforming on an in-vivo carotid scan (in-vivo).

Modules

inversion

High-level drivers for inverting the DAS beamformer.

operators

Differentiable forward operators for inverse beamforming.

seeding

Scatterer seeding for the scatterer-prior inversion.

solvers

Matrix-free linear-algebra utilities for inverse ultrasound problems.