Image Reconstruction Source Code
What does this package contain
Beam Hardening Correction Algorithms
All examples and data for our blind beam hardening correction method are
bhcEx with filenames ended with
Ex. The figures in our
paper can be reproduced by first run
yangEx, followed by
yangEx('plot'). Algorithm implementations are under
R. Gu and A. Dogandžić, “Blind X-ray CT Image Reconstruction from Polychromatic Poisson Measurements,” IEEE Trans. Comput. Imag., vol. 2, no. 2, pp. 150–165, 2016. [DOI] [PDF] [Poster] [Presentation Video]
R. Gu and A. Dogandžić. (Sep. 2015). Polychromatic X-ray CT Image Reconstruction and Mass-Attenuation Spectrum Estimation. arXiv: 1509.02193.
R. Gu and A. Dogandžić, “Beam hardening correction via mass attenuation discretization,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process., Vancouver, Canada, May 2013, pp. 1085–1089. [DOI] [PDF] [Poster]
Projected Nesterov's Proximal-Gradient (PNPG) algorithm
Although being used as a tool to solve the beam hardening problem, PNPG has evolved and now is living in a separate repository.
How to Install
To install this package, first download the repository by running
git clone https://github.com/isucsp/imgRecSrc.git
after downloading, from MATLAB change your current folder to
setupPath.m to add necessary paths to the environment.
For X-ray CT examples, the projection and back projection operator
subroutines may be called from MATLAB. Since they are written in
language, to prepare MATLAB recognizable
MEX files, go to
and compile the necessary files. Instructions on compiling the code are
provided for both
require: gcc, cuda toolkit (optional) and GPU (optional)
make cpu to compile all cpu implementations. If you have GPU
make gpu to compile GPU implementation of the X-ray CT
projection operators. The matlab code will automatically choose to run on
GPU if equipped.
If errors are reported while compiling the
*.cu files under
imgRecSrc/prj, please edit the first few lines in
imgRecSrc/prj/Makefile to make sure the path for your
Don't forget to add the path to CUDA library before starting your Matlab:
which can be added to your
.bashrc file without harm.
require: Visual Studio, cuda toolkit (optional) and GPU (optional)
imgRecSrc/setupPath.m can automatically compile all needed files
and add paths.
If there is a GPU equipped in your PC, follow the following steps:
VS Native Tools Command Promptvia
Start -> Microsoft Visual Studio -> Visual Studio Tools;
cdcommand to change directory to your
nvcc -c gpuPrj.cuto generate the
The comments in some of
*.m files may contain greek letters, which
UTF-8 encoded. Please open in an appropriately configured text