% Test various tomographic data collections 
%
% Samuli Siltanen Feb 2017

% Let's choose our projection directions
angvec = [[1:10],[31:40],[61:70],[91:100]];

% Evaluate the phantom
M = 128;
im = SqPhantom(M);

% Use radon.m to create a sinogram
sinogram = radon(im,angvec);

% Use iradon.m to reconstruct
recon = iradon(sinogram,angvec);

% Take a look
figure(1)
clf
subplot(1,2,1)
imagesc(im)
set(gca,'xtick',[0:.25:1]*M,'fontsize',32)
set(gca,'ytick',[0:.25:1]*M,'fontsize',32)
axis equal
subplot(1,2,2)
imagesc(recon)
set(gca,'xtick',[0:.25:1]*M,'fontsize',32)
set(gca,'ytick',[0:.25:1]*M,'fontsize',32)
axis equal

figure(2)
clf
imagesc(sinogram)
set(gca,'xtick',round([0:.25:1]*size(sinogram,2)),'fontsize',32)
set(gca,'ytick',round([0:.25:1]*size(sinogram,1)),'fontsize',32)
axis equal
