Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Example: Liver Theranostic Reconstruction

Crate: kwavers
Run: cargo run -p kwavers --example liver_theranostic_reconstruction
Source: crates/kwavers/examples/liver_theranostic_reconstruction.rs

What This Example Demonstrates

This example reconstructs liver acoustic-property maps for focused-ultrasound therapy planning. It compares straight-ray sound-speed estimation, Born inversion, reverse-time migration, and adjoint FWI, and it can use either a LiTS CT slice or a synthetic abdominal fallback phantom.

ComponentAPIValue
Grid constantsDX, NX, NY, NZUses a 3 mm spacing with an 80×5×80 slice-style reconstruction volume
Reconstruction familySoS / Born / RTM / FWIProduces four complementary views of the same liver target
Input datadata/lits17_sample/*.niiLoads LiTS CT + segmentation when available, otherwise falls back to a synthetic phantom

Key Code Snippet

const DX: f64 = 3.0e-3;
const NX: usize = 80;
/// 2-D coronal slice embedded in 3-D.  RTM's 4th-order FD Laplacian requires
/// `ny ≥ 5` (interior slice `2..ny-2`), so we pad in y with acoustically
/// identical planes — the physics remains 2-D.
const NY: usize = 5;
const NZ: usize = 80;

// ─────────────────────────────────────────────────────────────────────────────
// Tissue acoustic constants

Expected Output (if applicable)

A run prints which dataset path is used, steps through the reconstruction stages, and summarizes therapy-planning outputs derived from the recovered maps.

Book Chapter

← Theranostics: Combined Imaging and Therapy