File Exchange

image thumbnail

CT reconstruction package

version (4.98 KB) by Mark Bangert
Set of functions performing ct reconstruction tasks


Updated 29 Mar 2017

View Version History

View License

Set of functions performing ct reconstruction tasks like a radon transformation, a simple backprojection, a filtered backprojection using a convolution in the spatial domain, a filtered backprojection using a 2D Fourier transformation, and a filtered back projection using the central slice theorem.
It includes the function
that should run out of the box and uses Matlab's Shepp Logan Phantom for demonstration. It is also possible to run the myCtReconstruction with an argument

to perform image reconstruction on a custom data set.


[1] Set of CT reconstruction functions by Prof. Justin Romberg @
[2] W. Schlegel, J. Bille: Medizinische Physik 2: Medizinische Strahlenphysik

Cite As

Mark Bangert (2021). CT reconstruction package (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (27)


where is function file?


Chenyang Zhao

I found it is interesting that there will be some misalignment if using central slice theorem. If you try to input a 512*512 shepp logan phantom (sinogram 729*360), you will see there will be some streaking artifact at every edge. If you input a sinogram (dimension 729*360) with all 0 except 365th row (row in the center) to be 1, the result BPI will peak at 366*365 instead of 365*365. Why would this happen?

amilneni vinodh

Mohamad Ajam

yuan zhao

sa asal

Could you please help me running this code?

Grace Sooyeon Lee

Liang Xiaoxia

Juicy John

m x

how to change the size of output image?thanks!

Zhe Hu

Zhouping wei

Great job! Thanks!
But I have one question: how to adjust the center of rotation?

Alaa Maher


Really helpful!

Girvani Manoharan

how can I use this tool to reconstruct a set of projections from neutron imaging please?

Carla Romano

If I choose as input a phantomdata characterized by a sequence of image, is it possible that the process is done only on the first image? Because at the and I have backprojection in the same direction of the scan and not a slice

Gianni Schena

please remove mention to the CENTRAL SLICE THEOREM because you create great confusion ( to students for example). with the CST you recover your image via ifft2 after allocating radially the fft1 of the sinogram. in simple: ifft2(polar fft1 sinogram).


Leila Farid

I'm working on a project which aim to recreate the principle of a CT Scan. I have to treat the projection data. But when there is several detectors, the code does'nt seems to work.
Each column of my matrix is an angle and each line the intensity of light acquired by each detector.
Can you help me to understand better how the code is working ? I didn't find why i can't reconstrute the image my self
When i work with only 1 detector and translation+rotation moves around the object it works. It's when i want to pass to the next stage where there is only rotation and several detectors that it doesn't

Jean-Nicola Blanchet

The function "myFilteredBackprojectionCentralSlice.m" is a simple spatial domain backprojection that does not use the slice theorem. It does the following:
- fft projections
- filter projections in Fourier domain
- ifft back to spatial
- aggregate results (spread projections and sum)

It should be done in the follwing order:
- fft projection
- filter projections in Fourier domain
- aggregate results in the Fourier domain
- ffti aggregated result back to spatial

Saket Dandawate

The central slice algorithm[1] used in the CT package is wrong.

The central slice theorem dictated that if 1D-FT of projections is added at the center rotated at the corresponding theta then the 2D-IFT of the resultant data (in fourier domain) is equivalent to the back projections (in spacial domain).

As such visualization on the fly is only possible of the fourier domain data and not the spacial domain as you get the entire image once 2D-IFT is performed

[1] BPI = myFilteredBackprojectionCentralSlice(sinogram,thetas)

Ref :

Slide 6/7

Chapter 3 Page 56


Can someone out here explain the reconstruction code to me?


Excellent set of code. Thanks a lot.


Fantastic tool for didactic purposes and as a platform for further development. Thanks for sharing!!

Tai Chieh


It's really help


Excellent work

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired: CT Basic reconstruction algorithms

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!