Example: 3D Shear Wave Elastography Liver Fibrosis
Crate: kwavers
Run: cargo run -p kwavers --example swe_3d_liver_fibrosis
Source: crates/kwavers/examples/swe_3d_liver_fibrosis.rs
Overview
Complete clinical workflow for 3D SWE assessment of liver fibrosis using multi-directional shear waves and volumetric analysis.
Clinical Workflow
- Generate synthetic liver phantom with spatially-varying stiffness (fibrosis grades F0–F4)
- Simulate multi-directional shear wave propagation (lateral + axial)
- Extract displacement fields via cross-correlation tracking
- Estimate 3D shear modulus map via local frequency estimation
- Classify fibrosis grade using METAVIR-calibrated thresholds
- Output volumetric stiffness map and per-ROI statistics
The example uses
ElasticWaveSolver::propagate_volumetric_waves_with_body_forces because its
console report includes the retained history length. Callers that consume only
the wavefront tracker use track_volumetric_waves_with_body_forces, which
retains one displacement magnitude per eligible voxel and saved time instead
of all six displacement and velocity fields.
Fibrosis Grades
| Grade | Stiffness | Clinical significance |
|---|---|---|
| F0-F1 | 2–4 kPa | Normal to mild |
| F2 | 5–7 kPa | Moderate |
| F3-F4 | 8–12 kPa | Severe / cirrhosis |
Part Reference
Part II — Elastography