//! MRE (Magnetic Resonance Elastography) Inverse Solver //! //! This crate implements a Physics-Informed Neural Network (PINN) for solving //! the inverse Helmholtz equation to recover tissue stiffness maps from //! MRI-measured wave fields. //! //! # Physics Background //! //! MRE measures the propagation of mechanical waves through tissue. //! The governing equation is the Helmholtz equation: //! //! ```text //! div(mu * grad(u)) + rho * omega^2 * u = 0 //! ``` //! //! where: //! - `u(x,y)` is the complex wave displacement field (measured) //! - `mu(x,y)` is the shear modulus (stiffness) - what we want to find //! - `rho` is tissue density (~1000 kg/m^3) //! - `omega` is angular frequency (2*pi*f) //! //! # Architecture //! //! The solver uses a hybrid approach: //! 1. **Wave Net**: Neural network approximating u(x,y) with analytical derivatives //! 2. **Stiffness Texture**: Learnable 2D grid for mu(x,y) //! //! Key innovation: Analytical 2nd derivatives through the Wave Net using //! chain rule (not autograd or finite differences) for maximum accuracy. pub mod config; pub mod helmholtz; pub mod phantom; pub mod solver; pub mod stiffness_texture; pub mod training; pub mod wave_net; // Re-exports pub use config::MreConfig; pub use helmholtz::HelmholtzResidual; pub use phantom::PhantomGenerator; pub use solver::MreSolver; pub use stiffness_texture::StiffnessTexture; pub use wave_net::{WaveDerivatives, WaveNet}; // Re-export shared types for convenience pub use mre_shared::{ LossRecord, MreSnapshot, MreStatus, PhantomConfig, Point2D, StiffnessField, TissueProperties, TissueRegion, WaveField, };