TumorPDE is a research codebase for PDE-based modeling of brain tumor progression from medical imaging.
Current status:
- Infiltration (growth-only) model is implemented and tested.
- Deformation model is under development and not yet validated.
The main implemented model is a reaction-diffusion equation solved on a patient-specific 3D brain domain:
du/dt = D * div(v(x) grad u) + alpha * u * (1 - u)
u(x,t): tumor cell densityD: global diffusion scale (learned)alpha: proliferation rate (learned)v(x): fixed tissue diffusivity map built from GM/WM/CSF segmentations
The initial condition is a localized Gaussian with learnable center x0.
Parameter estimation uses gradient-based optimization with explicit sensitivity equations:
- sensitivities:
phi = du/dD,psi = du/dalpha,eta = du/dx0 - loss: voxelwise mismatch (default MSE) between simulated and observed tumor masks
- optimizer:
scipy.optimize.minimize(..., method="L-BFGS-B", jac=True)
This supports:
- single-scan calibration (
D,alpha,x0) - multi-scan calibration with inferred scan-alignment times
tumorpde/tumorpde/models/growth.py: infiltration PDE forward solver + calibrationtumorpde/models/deform.py: deformation-coupled model (incomplete)tumorpde/models/_base.py: shared model base classes and optimization utilitiestumorpde/volume_domain.py: patient-specific computational domaintumorpde/calc/: losses, linear algebra utilities, geometry helpersexamples/fd-growth-1d.ipynb: 1D infiltration demoexamples/fd-deform-1d.ipynb: 1D deformation prototype demoexamples/patient-reconstruct/: 3D patient reconstruction workflowtest/: derivative/sensitivity/loss utility tests used during development
From the repository root:
pip install -e .examples/patient-reconstruct/results/gifs_multiscan/STT.gif
For the full patient reconstruction pipeline, scripts, and outputs, see:
examples/patient-reconstruct/readme.md
