An advanced, object-oriented physical simulation and numerical verification pipeline built on top of the Core Imaging Library (CIL) and ASTRA Toolbox. This repository benchmarks analytic tomographic reconstruction against regularized iterative reconstruction methods under sparse angular sampling and non-stationary physical noise degradations.
- Author: M. Berrada
- Institutional Affiliation: Department of Epidemiology, Public Health and Social Sciences, Faculty of Medicine and Pharmacy of Tangier, University of Abdelmalek Essaadi
- Release Date: June 2026
- License: MIT
High-fidelity tomographic reconstruction from sparse or low-dose projections remains an ill-posed inverse problem. This pipeline models physical acquisition geometries under sparse angular configurations and simulates dual-source stochastic artifacts:
- Quantum Photon Starvation (Poisson Noise): Modeled via the physical Beer-Lambert attenuation law.
- Electronic Analog Readout Variations (Gaussian Noise): Mimicking internal scanner thermal noise circuitry.
The package benchmarks three reconstruction modalities:
- Filtered Back-Projection (FBP): Analytic baseline reconstruction.
-
Tikhonov Regularization (
$L_2$ -Smoothness): Solved via Conjugate Gradient Least Squares (CGLS). -
Total Variation (TV) Minimized Regularization (
$L_1$ -Edge Preservation): Non-smooth optimization solved via the Primal-Dual Hybrid Gradient (PDHG) algorithm.
Numerical validation is carried out through quantitative evaluation metrics, including Structural Similarity (SSIM), Root Mean Square Error (RMSE), Peak Signal-to-Noise Ratio (PSNR), and a custom numerical Error Amplification Stability Factor (
To ensure smooth operation, reproduction of benchmarks, and code cleanliness, the workspace is organized as follows:
LODESTAR/
│
├── data/ # Clean medical imaging input data (DICOM slices)
├── src/
│ ├── data_loader.py # Loads, resizes, and normalizes reference targets
│ ├── optimal_alphas.py # Retrieves pre-optimized regularization thresholds
│ ├── run_scenario.py # Core optimization solvers (CGLS, PDHG) and geometry setups
│ └── scenario.py # Master ReconstructionScenario engine class
│
├── figs/ # Automated multi-panel evaluation PDF plots output
├── results/ # Reconstructed output solution matrices (.npy arrays)
├── sinograms/ # Intermediate stochastically degraded sinograms (.npy arrays)
├── tables/ # Analytical tracking logs and grid-search ledgers (.csv)
│
├── .gitignore # Strict repository tracking filter (Excludes heavy data arrays)
├── environment.yml # Unified Conda reproduction environment schematic
└── main.py # Master execution and script routing file
The project requires:
- Python ≥ 3.10
- Conda
- CUDA-compatible GPU (recommended)
Clone repository:
git clone git@github.com:MBerrada-FMPT/LODESTAR.git
cd mon_projet_tomographieCreate environment:
conda env create -f environment.ymlActivate:
conda activate cilRaw clinical data are intentionally excluded from version control.
The repository expects:
data/
└── 1-066.dcm
Recommended sources:
- LIDC-IDRI
- public anonymized CT datasets
The file is used as the reference Ground Truth image.
main.py
controls:
- geometry,
- noise scenario,
- reconstruction method,
- optimization mode.
Example:
TARGET_NAME = "thorax" # "thorax" or "phantom"
DTHETA = 1 # 1 -> 180 views (Full sampling) | 3 -> 60 views (Sparse sampling)
SCENARIO = "Mixed_3%_5*10^4" # Targeted noise configuration label
GRID = False # Switch to 'True' to trigger an exhaustive Grid SearchWhen GRID is set to False, the script performs a single rapid evaluation matching the chosen SCENARIO block. It automatically queries the underlying database to fetch pre-optimized regularization hyperparameters (
Execute the routine by running:
python main.pyWhen GRID is set to True, the engine triggers a parametric evaluation routine spanning a comprehensive log-scale array of hyperparameters (25 steps from tables/optimized_alphas_[target][views].csv.
The analytical evaluation computes comparative quality indexes against the pure Ground Truth (GT) domain matrix:
- SSIM / PSNR / RMSE: Tracks structural deformation, contrast loss, and error density.
- Error Amplification Stability Factor (
$S$ ): Evaluates error propagation dynamics across the forward projection matrix layer into the inverse mapping space:$$S = \frac{\text{Relative Error}{\text{Image Space}}}{\text{Relative Error}{\text{Sinogram Space}}}$$-
$S \gg 1$ : Poor convergence or under-regularization (severe noise explosion). -
$S \approx 1$ : Robust, optimally regularized, and numerically stable inverse solution. =======
-
An advanced CIL & ASTRA-based tomographic reconstruction pipeline benchmarking FBP, Tikhonov, and Total Variation (TV) under sparse-view sampling and non-stationary physical noise. Developed at the Faculty of Medicine of Tangier.
ea1bc22c35b2c40b0344685e5ce29f7584acf4b2