Hi!
I created a package called RadonKA.jl which provides a parallel Radon and inverse Radon pair.
What can it do?
Further, it provides an exponential Radon transform which does not only calculate the line integral but also weights each value with an exponential decreasing factor depending on the distance to a circular boundary.
It’s all based on tracing rays through the pixel grid and weighting the absorption according to the length of the intersection with a cell.
Performance
The implementation is rather naive and totally ignores cache efficiency. But, based on KernelAbstractions.jl we utilize CPU threading and we also tested the CUDA backend.
I’m surprised that the performance is very similiar to Matlab’s Radon transform and the Astra toolbox. See details of the benchmark here.
Simple example
It’s not registered yet (in 3 days), but try it out with:
julia> ]add https://github.com/roflmaostc/RadonKA.jl
using RadonKA, ImageShow, ImageIO, TestImages
img = Float32.(testimage("resolution_test_512"))
angles = range(0f0, 2f0π, 500)[begin:end-1]
# 0.196049 seconds (145 allocations: 1009.938 KiB)
@time sinogram = radon(img, angles);
# 0.268649 seconds (147 allocations: 1.015 MiB)
@time backproject = RadonKA.iradon(sinogram, angles);
simshow(sinogram)
What’s next?
This package is relatively young and experimental, so please try it out and report bugs (also the reason why I post it here )! I’m willing to improve it. I provide some examples.
Further, I will work on an interface where rays don’t need to be parallel but ray angles can be specified separately. This include special cases such as Fan Beam Tomography.
Cone Beam would be more tricky, since I don’t trace 3D paths currently, only 2D slices in a 3D volume.
So yes I’m excited since it really helps already with my work regarding Volumetric Additive Manufacturing. Especially, the exponential Radon transform was important for my work, and I didn’t find any efficient implementation in any framework.
Best,
Felix