68 lines
2.0 KiB
Rust
68 lines
2.0 KiB
Rust
//! Medical Digital Twin Platform
|
|
//!
|
|
//! This crate provides a framework for creating patient-specific digital twins
|
|
//! of organs for physics-based simulation and treatment planning.
|
|
//!
|
|
//! # Overview
|
|
//!
|
|
//! A medical digital twin combines:
|
|
//! 1. **Patient-specific geometry** from medical imaging (CT/MRI)
|
|
//! 2. **Tissue properties** (thermal, mechanical, electrical)
|
|
//! 3. **Physics simulation** (bioheat, elasticity, electrophysiology)
|
|
//! 4. **What-if analysis** for treatment planning
|
|
//!
|
|
//! # Architecture
|
|
//!
|
|
//! ```text
|
|
//! Medical Images (CT/MRI)
|
|
//! ↓
|
|
//! Segmentation → Tissue Labels
|
|
//! ↓
|
|
//! Organ Geometry (3D volume with tissue map)
|
|
//! ↓
|
|
//! Physics Model (bioheat, elasticity, etc.)
|
|
//! ↓
|
|
//! Digital Twin
|
|
//! ↓
|
|
//! Simulation / What-if Analysis
|
|
//! ```
|
|
//!
|
|
//! # Example
|
|
//!
|
|
//! ```rust,ignore
|
|
//! use rtx_digital_twin::{DigitalTwin, TissueDatabase, OrganGeometry};
|
|
//!
|
|
//! // Create tissue database
|
|
//! let tissues = TissueDatabase::standard();
|
|
//!
|
|
//! // Load organ geometry from segmented volume
|
|
//! let geometry = OrganGeometry::from_segmentation(&volume, &tissues);
|
|
//!
|
|
//! // Create digital twin
|
|
//! let twin = DigitalTwin::new(geometry);
|
|
//!
|
|
//! // Run bioheat simulation
|
|
//! let result = twin.simulate_bioheat(boundary_conditions)?;
|
|
//!
|
|
//! // Perform what-if analysis (e.g., ablation planning)
|
|
//! let intervention = AblationProbe::new(position, power);
|
|
//! let outcome = twin.what_if(&intervention)?;
|
|
//! ```
|
|
|
|
#![forbid(unsafe_code)]
|
|
#![warn(missing_docs)]
|
|
|
|
mod error;
|
|
mod geometry;
|
|
mod intervention;
|
|
mod physics;
|
|
mod tissue;
|
|
mod twin;
|
|
|
|
pub use error::{DigitalTwinError, Result};
|
|
pub use geometry::{OrganGeometry, TissueLabel, VoxelData};
|
|
pub use intervention::{AblationProbe, HifuTransducer, Intervention, InterventionType};
|
|
pub use physics::{BioheatModel, BioheatParams, BoundaryCondition, SimulationResult};
|
|
pub use tissue::{TissueDatabase, TissueProperties, TissueType};
|
|
pub use twin::{DigitalTwin, GeometrySummary, TwinConfig, WhatIfResult};
|