After introducing the principle of ART according to Kaczmarz method in the last post [Link], it's time to implement it in ImageJ with JavaScript language...
1- Implementation
In ImageJ, the ART implementation is really simple as the projection computation is done by the Plot Profile function. The algorithm is schematically:
for each iteration
for each row of sinogram
p ← row;
a ← calc_projection(rec, angle);
err ← (p - a)* λ;
rec ← rec + err;
end for
end for
There is something new compared to the previous post: the relaxation factor λ (lambda) whose value is comprised between 0.0 and 1.0. This parameter allows to modify the convergence speed. A small value yields a more precise solution with a slow convergence. However, a value close to 1.0 allows a higher speed at the expense of quality
+++ IJ JavaScript snippet: ART_simple.js +++
+++ End of JavaScript snippet +++
2-Results
To try the previous script, I use the sinogram of Fig. 1 that you can download [Link] as a TIFF 32-bit image without any compression.
Fig.1: Sinogram used to try the ART script. |
Fig.2: Resulting 2D ART reconstruction |
Note: If you want to see this script in action uncomment line #27 // rec.show();
It's also possible to see the result of the reconstruction after each iteration since they are stored in the stack 'Rec2D_Cycles' as shown in Fig.3.
Fig.3: Results of the reconstruction along the five cycles. |
Playing with ART parameters
By default, the ART is calculated for 5 cycles and a relaxation factor of 0.33. However, you can easily modify the iterations number (line #6: var nbCycles=5;) and the relaxation factor (line #7: var relax=0.33;)
No comments:
Post a Comment