1
function [res]=pack_sinogram(sino, center, pad_multiply)
6
min_side = min(center, n - center);
7
max_side = max(center, n - center);
9
real_size = 2 * min_side;
10
data_start = center - min_side + 1;
11
data_end = center + min_side;
13
%We can use the bigest half as projection, but the reconstruction on the
14
%edge will be corrupted due to missing data.
15
%real_size = 2 * max_size;
19
full = (2^(ceil(log2(real_size))))*pad_multiply;
21
%negative values my produce distortions (we are padding with 0)
22
norm_sino=sino-min(min(sino));
24
pad = full - (data_end - data_start + 1);
25
padded_sino=[norm_sino(:,(center+1):data_end) zeros(angles,pad) norm_sino(:,data_start:center)];
27
%instead of fftshift we may do this interleaving to get spectrum in the center
28
%mod_sino=zeros(angles,full);
29
%mod_sino(:,1:2:end)=padded_sino(:,1:2:end);
30
%mod_sino(:,2:2:end)=-padded_sino(:,2:2:end);
32
spectrum=fft(padded_sino');
33
res = fftshift(spectrum, 1);