Skip to content

Commit

Permalink
Replace cone with fan which is more correct
Browse files Browse the repository at this point in the history
  • Loading branch information
roflmaostc committed Feb 7, 2024
1 parent 343dae6 commit 0c5cc8b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A simple yet sufficiently fast Radon and inverse Radon (iradon) transform implem
* [x] For 2D and 3D arrays
* [x] parallel `radon` and `iradon` (`?RadonParallelCircle`)
* [x] attenuated `radon` and `iradon` (see the parameter `μ`) and see this [paper](https://iopscience.iop.org/article/10.1088/0266-5611/17/1/309/meta) as reference)
* [x] arbitrary 2D geometries where starting and endpoint of each ray can be specified (cone beam could be a special case if this) (`?RadonFlexibleCircle`)
* [x] arbitrary 2D geometries where starting and endpoint of each ray can be specified (fan beam could be a special case if this) (`?RadonFlexibleCircle`)
* [x] based on [KernelAbstractions.jl](https://github.com/JuliaGPU/KernelAbstractions.jl)
* [x] tested on `CPU()` and `CUDABackend()`
* [x] registered adjoint rules for both `radon` and `iradon`
Expand Down
8 changes: 4 additions & 4 deletions docs/src/geometries.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ This interface has a simple API but is quite powerful.
The first range indicates the position upon entrance in the circle.
The second range indicates the position upon exit of the circle.

### Cone Beam
### fan Beam
```julia
geometry_cone = RadonFlexibleCircle(N, -(N-1)÷2:(N-1)÷2, range(-(N-1)÷4, (N-1)÷4, N-1))
geometry_fan = RadonFlexibleCircle(N, -(N-1)÷2:(N-1)÷2, range(-(N-1)÷4, (N-1)÷4, N-1))

projected_cone = iradon(sinogram, angles; geometry=geometry_cone);
projected_fan = iradon(sinogram, angles; geometry=geometry_fan);

simshow(projected_cone, γ=0.01)
simshow(projected_fan, γ=0.01)
```
![](../assets/parallel_geometry_cone.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A simple yet sufficiently fast Radon and inverse Radon (iradon) transform implem
* [x] For 2D and 3D arrays
* [x] parallel `radon` and `iradon` (`?RadonParallelCircle`)
* [x] attenuated `radon` and `iradon` (see the parameter `μ`)
* [x] arbitrary 2D geometries where starting and endpoint of each ray can be specified (cone beam could be a special case if this) (`?RadonFlexibleCircle`)
* [x] arbitrary 2D geometries where starting and endpoint of each ray can be specified (fan beam could be a special case if this) (`?RadonFlexibleCircle`)
* [x] It is restricted to the incircle of radius `N ÷ 2 - 1` if the array has size `(N, N, N_z)`
* [x] based on [KernelAbstractions.jl](https://github.com/JuliaGPU/KernelAbstractions.jl)
* [x] tested on `CPU()` and `CUDABackend`
Expand Down
10 changes: 5 additions & 5 deletions examples/1_documentation_different_geometries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,22 @@ projection_small = iradon(sinogram_small, angles; geometry=geometry_small);
simshow(projection_small)

# ╔═╡ da663a25-6dcd-4664-9bd1-c84970e58346
md"# Similar to Cone Beam Tomography"
md"# Similar to fan Beam Tomography"

# ╔═╡ 65d32c65-6e1f-417b-aba3-3c34dac35e05
geometry_cone = RadonFlexibleCircle(N, -(N-1)÷2:(N-1)÷2, range(-(N-1)÷4, (N-1)÷4, N-1))
geometry_fan = RadonFlexibleCircle(N, -(N-1)÷2:(N-1)÷2, range(-(N-1)÷4, (N-1)÷4, N-1))

# ╔═╡ 26036d0c-2d5e-436c-8343-c4cd66c362c6
N-100

# ╔═╡ 37d760fa-74e6-47d1-b8e6-3315c1747b4c
projected_cone = iradon(sinogram, angles; geometry=geometry_cone);
projected_fan = iradon(sinogram, angles; geometry=geometry_fan);

# ╔═╡ 878121c5-4ad5-477b-88c7-f53df7510052
simshow(projected_cone, γ=0.01)
simshow(projected_fan, γ=0.01)

# ╔═╡ afe43c8c-cb98-411b-af8f-1228983ee2e0
md"# Extreme Cone Beam Tomography"
md"# Extreme fan Beam Tomography"

# ╔═╡ 7b0c8263-50d0-4569-96cb-297b4746ece3
geometry_extreme = RadonFlexibleCircle(N, -(N-1)÷2:(N-1)÷2, zeros((199,)))
Expand Down
2 changes: 1 addition & 1 deletion src/geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ with respect to the midpoint which is located at `N ÷ 2 + 1`.
One definition could be: `RadonFlexibleCircle(10, -4:4, zeros((9,)))`
It would describe rays which enter the circle at positions `-4:4` but all of them would focus at the position 0 when leaving the circle.
This is an extreme form of cone beam tomography.
This is an extreme form of fan beam tomography.
"""
struct RadonFlexibleCircle{T, T2} <: RadonGeometry
N::Int
Expand Down

2 comments on commit 0c5cc8b

@roflmaostc
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/100420

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" 0c5cc8b64eb77478e29fbf5e00a7b995e10975fb
git push origin v0.3.1

Please sign in to comment.