% Example computations related to X-ray tomography.
% Here we apply the classical filtered back-projection method to the
% tomographic data created in routine XR3_NoCrimeData_comp.m
%
% Samuli Siltanen February 2011

% Load original target and measurement matrix
load data/RadonMatrix64 target measang A N
[Nrow,tmp] = size(A);
P          = Nrow/length(measang);

% Load noisy measurements from disc. The measurements have been simulated
% (avoiding inverse crime) in routine XR03_NoCrimeData_comp.m
load data/XrayNoCrime64 N mncn

% Reconstruct using Matlab's inverse Radon transform routine
tic
recn = iradon(mncn,measang);
recn = recn(2:end-1,2:end-1);
comptime = toc;

% Take a look at the reconstruction
figure(1)
clf
imagesc([target,recn],[0,1])
colormap gray
axis equal
axis off


