Medical imaging technology filter back projection

function reconstruction
clear;
close all;
N=256;%N*N size image
delta=3; %equivalent to Φ
a = 100;
b = 50;
d = 1;
%Generate ellipse
for m =1:180/delta;
    L =a^2*cos(m*delta)^2+b^2*sin(m*delta)^2;
    for t=-N/2+1:N/2;
        if (t^2 <= L)
            proj(t+N/2,m)=2*a*b*sqrt(Lt^2)/L;
        else
            proj(t+N/2,m)=0;
        end
    end
end
%%%% various filtering Function
for t = -N+1:N-1;
    h1(t+N)=-2/(pi^2*d^2*(4*t^2-1));% SL
end;
for t= -N+1:N-1;
    if t==0
        h2(t+N)=1/(4*d^2);% RL
    elseif mod(t,2) == 1
        h2(t+N)=-1/(t^2*pi^2*d^2);
    else
        h2(t+N)=0;
    end;
end;
% Lewitt
esp=0.5;
for t=-N+1:N-1;
    if t==0
        h3(t+N)=(1-2*esp/3)/(4*d^2);
    elseif mod(t,2)==1
        h3(t+N)=-(1-esp)/(t^2*pi^2*d^2);
    else
        h3(t+N)=-esp/(t^2*pi^2*d^2);
    end;
end;
%存储各种反投影结果
rProj1=zeros(N,N);
rProj2=zeros(N,N);
rProj3=zeros(N,N);
rProj4=zeros(N,N);
nProj=[];
.....................................................

Guess you like

Origin blog.csdn.net/ccsss22/article/details/115274013