필터 지우기
필터 지우기

Hi all! I have a question regarding matlab CT reconstruction package.

조회 수: 1 (최근 30일)
misbah mateen
misbah mateen 2017년 7월 12일
I have downloaded CT reconstruction package but don't know how to use it with my code? i want to use myBackprojection.m file in it. i have copied the whole package to my project's folder. but now i don't know how to use it. plz help me out. here is the code of myBackprojection.m file
function BPI = myBackprojection(sinogram,thetas) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % unfiltered back projection -> schlegel & bille 9.1.2 % modified by: Mark Bangert % m.bangert@dkfz.de 2011
% figure out how big our picture is going to be. numOfParallelProjections = size(sinogram,1); numOfAngularProjections = length(thetas);
% convert thetas to radians thetas = (pi/180)*thetas;
% set up the backprojected image BPI = zeros(numOfParallelProjections,numOfParallelProjections);
% find the middle index of the projections midindex = floor(numOfParallelProjections/2) + 1;
% set up the coords of the image [xCoords,yCoords] = meshgrid(ceil(-numOfParallelProjections/2):ceil(numOfParallelProjections/2-1));
% loop over each projection for i = 1:numOfAngularProjections
% figure out which projections to add to which spots
rotCoords = round(midindex + xCoords*sin(thetas(i)) + yCoords*cos(thetas(i)));
% check which coords are in bounds
indices = find((rotCoords > 0) & (rotCoords <= numOfParallelProjections));
newCoords = rotCoords(indices);
% summation
BPI(indices) = BPI(indices) + sinogram(newCoords,i)./numOfAngularProjections;
% visualization on the fly
imagesc(BPI)
drawnow
end

답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by