Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LODESTAR: Low-Dose Sparse Tomography Analysis and Reconstruction Pipeline

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.


Authorship & Institutional Affiliation

  • 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

Abstract & Research Context

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:

  1. Quantum Photon Starvation (Poisson Noise): Modeled via the physical Beer-Lambert attenuation law.
  2. 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 ($S$) to evaluate regularization conditioning.


Computational Infrastructure & Folder Topology

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

Installation

Requirements

The project requires:

  • Python ≥ 3.10
  • Conda
  • CUDA-compatible GPU (recommended)

Environment creation

Clone repository:

git clone git@github.com:MBerrada-FMPT/LODESTAR.git
cd mon_projet_tomographie

Create environment:

conda env create -f environment.yml

Activate:

conda activate cil

Dataset Preparation

Raw 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.


Running the Pipeline

The main execution file:

main.py

controls:

  • geometry,
  • noise scenario,
  • reconstruction method,
  • optimization mode.

Configuration Parameters

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 Search

Execution Strategy A: Single Verification Evaluation (GRID = False)

When 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 ($\alpha_{\text{Tikhonov}}$, $\alpha_{\text{TV}}$), applies the mixed non-stationary artifacts, performs the inverse transformations, outputs full comparative log arrays, and renders the diagnostic layout grid.

Execute the routine by running:

python main.py

Execution Strategy B: Exhaustive Optimization Grid Search (GRID = True)

When GRID is set to True, the engine triggers a parametric evaluation routine spanning a comprehensive log-scale array of hyperparameters (25 steps from $10^{-5}$ to $10^{1}$). The search engine evaluates all noise configurations from the validation pool, tracks performance variations, locks down global maximization metrics, isolates optimal parameters, and exports the ledger directly to tables/optimized_alphas_[target][views].csv.


Image Assessment & Numerical Validation

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. =======

LODESTAR

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

About

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.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages