Reputation: 1111
I have an assignment to create a 2D image from a Sinogram. I have the following:
function recon = fourier(sinogram, interpolation)
tic;
[rows cols] = size(sinogram);
% calculate 1D FFT of the sinogram
% fftSino = ...;
fftSino = fft(sinogram);
% prepare the coordinate system change
cartesianX = 0:1/(cols-1):1;
cartesianY = -1:2/(rows-1):1;
[x y] = meshgrid(-1:2/(rows-1):1);
ySign = y < 0;
polarAngle = ~ySign - atan2(y, x) / pi;
polarRadius = sqrt(x.^2 + y.^2) .* (ySign - ~ySign);
%%
% perform coordinate system change
fftSinoInterp = pol2cart(polarAngle, polarRadius);
But now I do not know how to interpolate the complex numbers onto my Cartesian grid. Can anyone give me a hint on what function to use with what parameters? I looked at interp2, but I could not figure out what to use for X Y Z. Also I do not know how interp1 or TriScatteredInterp could work here.
Upvotes: 0
Views: 1674
Reputation: 708
I think you're really trying to do filtered backprojection. You do not specify what angles were used to generate your sinogram, so your function declaration is incomplete; reconstruction may not even be possible if you do not know what angles were used. pol2cart() and the rest of your code does not do anything useful in the context of reconstructing an image.
Instead, you should probably be using iradon(). Please see my other answer about using iradon() at this page.
I also advise you to read "Principles of Computerized Tomographic Imaging" chapter 3, available here for free. The filtered backprojection algorithm starts on page 62. If that's too difficult, you can read this student project.
Upvotes: 1