Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
misbah mateen
misbah mateen le 12 Juil 2017
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

Réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by