Add support for ultrasound data
Unlike other imaging modalities like MRI or CT, ultrasound images have distinct characteristics, including high noise levels, unique texture patterns, and variable contrast depending on the specific tissue being examined. Processing ultrasound data requires specialized algorithms, such as speckle reduction and boundary enhancement, which differ significantly from standard image processing techniques.
To integrate ultrasound data into our existing pipelines, we need to add flexible support options. These might include handling raw ultrasound data, incorporating specialized preprocessing steps, or enabling data streaming. Supporting raw data could open possibilities for real-time analysis, while collaboration with platforms like Holoscan could further enhance our capabilities in handling and processing ultrasound imaging data effectively.
Hi all — picking up this thread again as a first contribution toward ultrasound support in MONAI, and I'd like to check the shape of a minimal first PR with you (especially @ericspod, @mingxin-zheng, @aylward, and the Ultrasound Working Group) before opening anything.
Reading of the thread so far
- Post-processed DICOM ultrasound is already loadable (
PydicomReader), and tracked / preclinical volumes in NRRD / MetaIO are already readable via the existing NRRD and ITK readers, so a new reader is not the bottleneck. - MONAI already has one ultrasound-specific piece:
UltrasoundConfidenceMapTransform(Karamalis et al.). - What several people asked for, and what doesn't exist yet, is ultrasound-specific augmentation / preprocessing for B-mode images:
- @ericspod: transforms for US data, "including generating realistic noise or other signal degradation specific to US for data augmentation".
- @mingxin-zheng: "at least two special kinds there: noise introduced by speckle and imaging-depth".
- @aylward / @mingxin-zheng: simulating TGC gain-level change and imaging-depth change for curvilinear transducers, to make models robust to transducer settings at deployment time.
- @jamesobutler: depth-dependent attenuation, TGC, shadowing, and speckle as the practical factors when preparing US images for MONAI models.
Proposed minimal slice (one PR)
Two new randomizable intensity transforms in monai/transforms/intensity/, following the existing RandRicianNoise / RandGaussianNoise pattern (array + dict versions, CPU-testable, no new dependencies):
RandSpeckleNoise— multiplicative speckle noise for B-mode images (unit-mean Gamma-distributed factor; relative std sampled per call). Models fully developed speckle and keeps mean intensity unchanged in expectation.RandUltrasoundDepthGain— a smooth depth-dependent gain profile along the depth axis (log-linear gain with a randomly sampled slope), simulating TGC adjustments and depth attenuation / shadowing with one knob: a negative slope darkens with depth, a positive slope brightens with depth.
Plus unit tests mirroring the existing noise-transform tests.
Deliberately out of this slice (happy to take on as follow-ups if the Working Group wants them, but I don't want to guess the design in a first PR):
- B-mode ↔ transducer-line (back-scan-conversion) for convex probes (@aylward's point) — needs probe geometry (sector angle, origin, radius) and a resampling design decision.
- RF / raw channel data handling, beamforming, and scan conversion — needs the probe-metadata discussion @bcjiang and @mingxin-zheng raised, and the per-line spatial transform question for
MetaTensor. - Holoscan streaming / live acquisition.
- Any change to
MetaTensorfor non-affine scan conversion.
Questions
- Is this the right first slice, and are these two transforms the right two?
- Should this go through the Ultrasound Working Group (mailing list / monthly meeting) for review, or is review here on the issue + PR enough?
- Any naming or API preferences before I open the PR (e.g. fold the depth transform into a more general gain transform, or keep it US-specific)?
Thanks!