RadonKA

A simple yet sufficiently fast (attenuated) Radon and backproject implementation using KernelAbstractions.jl. Runs on CPU, CUDA, ...

https://github.com/roflmaostc/radonka.jl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: iop.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

automatic-differentiation computed-tomography ct cuda gpu julia julia-language optimization radon radon-transform tomography x-ray

Keywords from Contributors

numerics
Last synced: 4 months ago · JSON representation ·

Repository

A simple yet sufficiently fast (attenuated) Radon and backproject implementation using KernelAbstractions.jl. Runs on CPU, CUDA, ...

Basic Info
Statistics
  • Stars: 17
  • Watchers: 2
  • Forks: 1
  • Open Issues: 5
  • Releases: 13
Topics
automatic-differentiation computed-tomography ct cuda gpu julia julia-language optimization radon radon-transform tomography x-ray
Created over 2 years ago · Last pushed 4 months ago
Metadata Files
Readme License Citation

README.md

RadonKA.jl

A simple yet sufficiently fast Radon and adjoint Radon (backproject) transform implementation using KernelAbstractions.jl. It offers multithreading and CUDA support and outperforms any existing Julia Radon transforms (at least the ones we are aware of). On CUDA it is faster much than Matlab and it offers the same or faster speed than ASTRA.

⚠️ This package is still very young. I would be happy to receive any feedback or if we can improve anything, just open an issue! ⚠️

Build Status Coverage Documentation for stable version Documentation for development version

Quick Overview

  • [x] For 2D and 3D arrays
  • [x] parallel radon and backproject (?RadonParallelCircle)
  • [x] attenuated radon and backproject (see the parameter μ) and see this paper as reference)
  • [x] arbitrary 2D geometries where starting and endpoint of each ray can be specified (fan beam could be a special case of this) (?RadonFlexibleCircle)
  • [x] different strength weighting of rays
  • [x] based on KernelAbstractions.jl (tested on CPU() and CUDABackend())
  • [x] registered adjoint rules for both radon and backproject with ChainRulesCore.jl, hence automatic differentiation (AD) compatible.
  • [x] high performance however not ultra high performance. On par with ASTRA, on CUDA faster than Matlab.
  • [x] simple and extensible API

Installation

This toolbox runs with CUDA support on Linux, Windows and MacOS! Requires at least Julia 1.9 julia julia> ]add RadonKA

Simple use

```julia using RadonKA, ImageShow, ImageIO, TestImages

img = Float32.(testimage("resolutiontest512")) angles = range(0f0, 2f0π, 500)[begin:end-1]

0.085398 seconds (260 allocations: 1.006 MiB)

@time sinogram = radon(img, angles);

0.127043 seconds (251 allocations: 1.036 MiB)

@time backproject = RadonKA.backproject(sinogram, angles);

simshow(sinogram) simshow(backproject)

using CUDA img_c = CuArray(img)

0.003363 seconds (244 CPU allocations: 18.047 KiB) (7 GPU allocations: 1007.934 KiB, 0.96% memmgmt time)

CUDA.@time sinogram = radon(img_c, angles);

0.005928 seconds (218 CPU allocations: 16.109 KiB) (7 GPU allocations: 1.012 MiB, 0.49% memmgmt time)

CUDA.@time backproject = RadonKA.backproject(sinogram, angles); ```

Examples

See the documentation. You can also run the examples locally. Download this repository and then do the following in your REPL: ```julia julia> cd("examples/")

julia> using Pkg; Pkg.activate("."); Pkg.instantiate() Activating project at ~/.julia/dev/RadonKA.jl/examples

julia> using Pluto; Pluto.run() `` A browser should open. The following examples show case the ability of this package: * Simpleradonandbackproject`: Pluto notebook * Different geometries: Pluto notebook * Reconstruction of a CT dataset with an optimizer: Pluto notebook * How this package is used in Tomographic Volumetric Additive Manufacturing (3D printing): Pluto notebook

Citation

This package was created as part of scientific work. Please consider citing it :) bibtex @article{Wechsler:24, author = {Felix Wechsler and Carlo Gigli and Jorge Madrid-Wolff and Christophe Moser}, journal = {Opt. Express}, keywords = {3D printing; Computed tomography; Liquid crystal displays; Material properties; Ray tracing; Refractive index}, number = {8}, pages = {14705--14712}, publisher = {Optica Publishing Group}, title = {Wave optical model for tomographic volumetric additive manufacturing}, volume = {32}, month = {Apr}, year = {2024}, url = {https://opg.optica.org/oe/abstract.cfm?URI=oe-32-8-14705}, doi = {10.1364/OE.521322}, }

Development

File an issue on GitHub if you encounter any problems. You can also join my conference room. Give me a minute to join!

Similar packages

Python

There is TIGRE and ASTRA which both offer more functionality for classic CT problems. They also feature GPU acceleration, however we did not observe that they outperform this package. Also, they don't allow to calculate the attenuated Radon transform and don't allow for arbitrary ray geometries, as we do. The fastest implementation we found, is the unmaintained torch-radon. Its kernels are written in CUDA C code and offer a PyTorch interface. There is a torch-radon fork which allows to run it with newer versions. It offers no attenuated Radon transform.

Julia

There is Sinograms.jl and the JuliaImageRecon organization. No arbitrary geometries can be specified. And also no attenuated Radon transform is possible.

Matlab

Matlab has built-in a radon and iradon(...,'linear','none'); transform which is similar to our lightweight API. However, no CUDA acceleration, no 3D arrays and no attenuated Radon transform.

Owner

  • Name: Felix Wechsler
  • Login: roflmaostc
  • Kind: user
  • Location: EPFL, Lausanne, Switzerland

My passion is combining optics with computer science. Currently PhD @ LAPD @ EPFL

Citation (CITATION.bib)

@article{Wechsler:24,
author = {Felix Wechsler and Carlo Gigli and Jorge Madrid-Wolff and Christophe Moser},
journal = {Opt. Express},
keywords = {3D printing; Computed tomography; Liquid crystal displays; Material properties; Ray tracing; Refractive index},
number = {8},
pages = {14705--14712},
publisher = {Optica Publishing Group},
title = {Wave optical model for tomographic volumetric additive manufacturing},
volume = {32},
month = {Apr},
year = {2024},
url = {https://opg.optica.org/oe/abstract.cfm?URI=oe-32-8-14705},
doi = {10.1364/OE.521322},
}

GitHub Events

Total
  • Create event: 2
  • Commit comment event: 2
  • Release event: 1
  • Issues event: 4
  • Watch event: 1
  • Issue comment event: 14
  • Push event: 16
  • Pull request event: 2
Last Year
  • Create event: 2
  • Commit comment event: 2
  • Release event: 1
  • Issues event: 4
  • Watch event: 1
  • Issue comment event: 14
  • Push event: 16
  • Pull request event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 191
  • Total Committers: 2
  • Avg Commits per committer: 95.5
  • Development Distribution Score (DDS): 0.005
Past Year
  • Commits: 9
  • Committers: 2
  • Avg Commits per committer: 4.5
  • Development Distribution Score (DDS): 0.111
Top Committers
Name Email Commits
roflmaostc f****t@m****g 190
CompatHelper Julia c****y@j****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 10
  • Total pull requests: 9
  • Average time to close issues: 3 days
  • Average time to close pull requests: 11 days
  • Total issue authors: 6
  • Total pull request authors: 2
  • Average comments per issue: 3.7
  • Average comments per pull request: 0.67
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 2
  • Pull requests: 2
  • Average time to close issues: 13 days
  • Average time to close pull requests: about 2 months
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 5.0
  • Average comments per pull request: 2.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • roflmaostc (5)
  • mahaa2 (1)
  • sebaseb98 (1)
  • jakubMitura14 (1)
  • stisa (1)
  • Dale-Black (1)
  • jrkager (1)
  • JuliaTagBot (1)
Pull Request Authors
  • roflmaostc (9)
  • github-actions[bot] (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • julia 4 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 12
juliahub.com: RadonKA

A simple yet sufficiently fast (attenuated) Radon and backproject implementation using KernelAbstractions.jl. Runs on CPU, CUDA, ...

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 4 Total
Rankings
Dependent repos count: 9.8%
Average: 37.0%
Dependent packages count: 39.5%
Stargazers count: 45.6%
Forks count: 53.2%
Last synced: 4 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v3 composite
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-docdeploy releases/v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite