# Fourier Slice Theorem - Reconstruction Fourier Space

I've stuck in one problem. I need to perform Fourier Slice Theorem on sinogram of medical image.

I read a lot about this theorem. I write a matlab code but results are always non-sense after inverse fourier transform. But Fourier Space seems alright.

I fill Fourier space with converting polar coordinates to cartesian coordinates. I apply 1 Dimensional Fast Fourier Transform with ftt command on every sinogram lines. After for each angle (I used 180 rotation angle) and radius value I convert it to cartesian coordinates and for each corresponding values G(theta, radius) ==> F(x,y) I filled up Fourier Space. It seems logical but results is not. How can I correct my code to run this algorithm?

Circular shape is Fourier Space, other nonsenseless image is ifft. Original image is binary liver but I can't add it.

Thank you!

Plus, my matlab code!

[![I=imread('binaryliver.png');

% I = im2bw(I, 0.1);
%Sinogram was calculated before for 180 angle!
$w,h$ = size(I);

theta = 0:1:179;][1]][1]

xorg = floor(h/2);
yorg = floor(w/2);  %for find origin of matrix

F = zeros(w,h);     %fourier space assigment

for i = 1:length(theta)

E(:,:,i) = fft(sinogram(i,:));  %calculate FFT for each line of sinogram

end

for i = 1:length(theta)

for r = 1: length(E(:,:,1)) %Convert polar coordinates to cartesian coordinates

x = xorg + (r-h/2+1)*cosd(-theta(i));
y = yorg + (r-w/2+1)*sind(-theta(i));

if x == 0 && y == 0   %

else
yy = round(y); xx = round(x);

if yy <= 0

yy = 1;

elseif yy > h
yy = h;

end

if xx <= 0

xx = 1;

elseif xx > w

xx = w;

end
value = E(1,r,i);
F(xx, yy) = value;
end
end

end

Im2=abs(ifft2(F));
figure; imshow(log(1+abs(F)),[]);

figure; imshow(Im2, []);

• Welcome to SE.DSP! Please edit your question and add the actual image. You will need to delete one of the others, but one of the higher-rep users can then edit it and allow three images in the question. Ping me once you're done.
– Peter K.
Commented May 26, 2017 at 20:47
• Ok, sir. I did it. Commented May 26, 2017 at 21:20