CT Reconstruction with Filtered Back-Projection
Objective
Rebuild a cross-section from its shadows
A CT scanner measures how much X-ray energy is absorbed along thousands of lines through the body, from many angles. The image has to be computed from those projections.
In this experiment I implemented Filtered Back-Projection (FBP) — the algorithm behind decades of clinical CT — from first principles in Python, without a reconstruction library, and measured how faithfully it recovers a known test object.
Tools & Data
Algorithm, Implemented from Scratch
One function per stage of the CT pipeline
-
padImage()
Zero-pads the image to a square the length of its diagonal so nothing is truncated when it rotates.
-
getProj() — Radon transform
Rotates the object through 0–180° in 1° steps and sums along columns, simulating detector readings and building the 181-angle sinogram.
-
projFilter() — ramp filter
Filters every projection in the frequency domain with a windowed ramp (Ram-Lak) filter to undo the blur of plain back-projection.
-
backproject()
Smears each filtered projection back across the image plane at its angle and accumulates the result.
-
Normalise, crop, compare
Rescales to 8-bit, crops to the original field of view and computes an absolute error map against the ground truth.
Phantom and Sinogram
Key Concepts Demonstrated
How a 2D object becomes a sinogram — each row a detector position, each column a projection angle.
Why unfiltered back-projection blurs (1/r), and how a ramp filter in Fourier space corrects it.
Reconstructing the image by distributing filtered projections back along their acquisition lines.
Using a phantom with known ground truth and a difference image to judge reconstruction accuracy.
Figures
Input phantom & sinogram · original vs reconstruction vs error
Why It Matters
Understanding the algorithm, not just calling it
FBP is still the reference against which iterative and deep-learning CT reconstruction is measured, and low-dose CT research is largely about improving on it. Implementing the Radon transform, the filter and back-projection by hand builds the intuition needed to tune reconstruction kernels, diagnose artefacts and evaluate learned reconstructions honestly.
Coursework for the Medical Imaging Laboratory (BME-3202), B.Sc. Biomedical Engineering, Islamic University.