www.gusucode.com > images 案例代码 matlab源码程序 > images/ConvertParallelbeamProjectionsToFanbeamProjectionsExample.m

    %% Convert Parallel-beam Projections to Fan-beam Projections
% 
%%
% Generate parallel-beam projections
ph = phantom(128);
theta = 0:180;
[P,xp] = radon(ph,theta);
imshow(P,[],'XData',theta,'YData',xp,'InitialMagnification','fit')
axis normal
title('Parallel-Beam Projections')
xlabel('\theta (degrees)')
ylabel('x''')
colormap(gca,hot), colorbar
%% 
% Convert to fan-beam projections
[F,Fpos,Fangles] = para2fan(P,100);  
figure
imshow(F,[],'XData',Fangles,'YData',Fpos,'InitialMagnification','fit')
axis normal
title('Fan-Beam Projections')
xlabel('\theta (degrees)')
ylabel('Sensor Locations (degrees)')
colormap(gca,hot), colorbar