Skip to content

Commit

Permalink
Add some docs for spatially varying
Browse files Browse the repository at this point in the history
  • Loading branch information
roflmaostc committed Apr 12, 2024
1 parent 4da36bf commit 6f74166
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 7 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,19 @@ The following examples show case the ability of this package:
# Citation
This package was created as part of scientific work. Please consider citing it :)
```bibtex
@misc{wechsler2024wave,
title={Wave optical model for tomographic volumetric additive manufacturing},
author={Felix Wechsler and Carlo Gigli and Jorge Madrid-Wolff and Christophe Moser},
year={2024},
eprint={2402.06283},
archivePrefix={arXiv},
primaryClass={physics.optics}
@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},
}
```

Expand Down
Binary file added docs/src/assets/mu_spatially.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/assets/mu_spatially_backprojected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/src/geometries.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,23 @@ simshow(projected_exp)
![](../assets/parallel_geometry_mu.png)


### Spatially Varying Absorption

The ray gets some attenuation with `exp(-μ*x)` where `μ` varies spatially.
To represent this spatial variation, we can simply use an array for μ.

```julia
μ = 0.5 .* box((N, N), (2, 50));

simshow(μ)
```
![](../assets/mu_spatially.png)


```julia
projected_1 = backproject(sinogram, angles, μ=μ);
projected_2 = backproject(sinogram, angles .+ π / 4, μ=μ);

[simshow(projected_1) simshow(projected_2)]
```
![](../assets/mu_spatially_backprojected.png)
61 changes: 61 additions & 0 deletions examples/3_spatially_varying_absorption.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,54 @@ problem = OptimizationProblem(opt_fun, init0, angles);
# ╔═╡ 5f5fb511-4b55-43bb-b8ac-f520e8b3bbc7
simshow(res6)

# ╔═╡ e6b5f0b8-e4c4-425a-905d-3678396d4dcc
md"# 6 Scratch"

# ╔═╡ 370d11ad-3b75-4013-8a1d-9439f1bf69b2
angles2 = [0]

# ╔═╡ 8909b583-1674-49eb-a17e-efe01cfb2154
N = 200

# ╔═╡ cc8c8da2-18a8-406e-9b22-b8bfa4b76c48
sinogram2 = zeros((N - 1, length(angles2)))

# ╔═╡ 775543bb-7c6d-46d5-91e1-cbcd980d22d5
sinogram2[1:5:end] .= 1

# ╔═╡ a97b5c18-921c-422c-a632-58b883f2e89c
geometry_parallel = RadonParallelCircle(N, -(N-1)÷2:(N-1)÷2)

# ╔═╡ 950f65be-8d23-4b97-ae39-821c48d86ea5
projection_parallel = backproject(sinogram2, angles2; geometry=geometry_parallel);

# ╔═╡ b63b4b08-0a57-4685-83d6-b0edf0192c28
simshow(projection_parallel)

# ╔═╡ 2ad8b60a-fa22-4bb2-9e2f-fb819436b229
geometry_extreme = RadonFlexibleCircle(N, -(N-1)÷2:(N-1)÷2, zeros((199,)))

# ╔═╡ 5addb1be-736c-4d6e-83ed-12e61908acdb
μ2 = 0.5 .* box((N, N), (2, 50));

# ╔═╡ 3cddcaf4-972e-4e6c-967d-a7ed66c70133
simshow(μ2)

# ╔═╡ 643831ed-7266-4f1c-ba71-44ebcc44701b
begin
projected_1 = backproject(sinogram2, angles2, μ=μ2);
projected_2 = backproject(sinogram2, angles2 .+ π / 4, μ=μ2);

[simshow(projected_1) simshow(projected_2)]
end

# ╔═╡ e33dc483-bd00-4806-b319-139ce0df0756
begin
projected_exp2 = backproject(sinogram2, angles2, μ=0.04);

simshow(projected_exp2)
end

# ╔═╡ Cell order:
# ╠═3e7e2e30-cb85-4eb8-b4f5-b8b19ecade8c
# ╠═8abe2914-922f-4ea5-8d85-b435a22c897f
Expand Down Expand Up @@ -131,3 +179,16 @@ simshow(res6)
# ╠═fd3a4f13-27c8-4766-9e58-07050aa1db2f
# ╠═26015d23-e708-4ebc-b718-18bd5104000b
# ╠═5f5fb511-4b55-43bb-b8ac-f520e8b3bbc7
# ╠═e6b5f0b8-e4c4-425a-905d-3678396d4dcc
# ╠═370d11ad-3b75-4013-8a1d-9439f1bf69b2
# ╠═8909b583-1674-49eb-a17e-efe01cfb2154
# ╠═cc8c8da2-18a8-406e-9b22-b8bfa4b76c48
# ╠═775543bb-7c6d-46d5-91e1-cbcd980d22d5
# ╠═a97b5c18-921c-422c-a632-58b883f2e89c
# ╠═950f65be-8d23-4b97-ae39-821c48d86ea5
# ╠═b63b4b08-0a57-4685-83d6-b0edf0192c28
# ╠═2ad8b60a-fa22-4bb2-9e2f-fb819436b229
# ╠═5addb1be-736c-4d6e-83ed-12e61908acdb
# ╠═3cddcaf4-972e-4e6c-967d-a7ed66c70133
# ╠═643831ed-7266-4f1c-ba71-44ebcc44701b
# ╠═e33dc483-bd00-4806-b319-139ce0df0756

0 comments on commit 6f74166

Please sign in to comment.