30 lines
584 B
Plaintext
30 lines
584 B
Plaintext
|
function f = retroprojection(sinogramme, theta, n_rayons, n_lignes, n_colonnes)
|
||
|
|
||
|
n_theta = length(theta);
|
||
|
f = zeros(n_lignes, n_colonnes);
|
||
|
|
||
|
for k=1:n_theta
|
||
|
|
||
|
angle = theta(k);
|
||
|
|
||
|
for i=1:n_lignes
|
||
|
for j=1:n_colonnes
|
||
|
|
||
|
x = j - n_colonnes/2;
|
||
|
y = -i + n_lignes/2;
|
||
|
|
||
|
t = x * cos(angle) + y * sin(angle);
|
||
|
t = t + n_rayons/2;
|
||
|
t = ceil(t);
|
||
|
|
||
|
f(i, j) = f(i, j) + sinogramme(t, k);
|
||
|
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
f = f / n_rayons;
|
||
|
|
||
|
end
|
||
|
|