Skip to content

Commit

Permalink
Fix urls (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffFessler authored Feb 15, 2023
1 parent 3ce70f6 commit 63d0258
Show file tree
Hide file tree
Showing 19 changed files with 194 additions and 355 deletions.
9 changes: 9 additions & 0 deletions docs/inc/reproduce.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# ### Reproducibility

# This page was generated with the following version of Julia:
using InteractiveUtils: versioninfo
io = IOBuffer(); versioninfo(io); split(String(take!(io)), '\n')

# And with the following package versions
import Pkg; Pkg.status()
14 changes: 14 additions & 0 deletions docs/inc/urls.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

#=
This page comes from a single Julia file:
[`@__NAME__.jl`](xxxrepo/@__NAME__.jl).
You can access the source code
for such Julia documentation
using the 'Edit on GitHub' link in the top right.
You can view the corresponding notebook in
[nbviewer](https://nbviewer.org/) here:
[`@__NAME__.ipynb`](xxxnb/@__NAME__.ipynb),
or open it in [binder](https://mybinder.org/) here:
[`@__NAME__.ipynb`](xxxbinder/@__NAME__.ipynb).
=#
40 changes: 9 additions & 31 deletions docs/lit/examples/01-overview.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
#---------------------------------------------------------
# # [ImagePhantoms overview](@id 01-overview)
#---------------------------------------------------------

#=
# [ImagePhantoms overview](@id 01-overview)
This page explains the Julia package
[`ImagePhantoms`](https://github.com/JuliaImageRecon/ImagePhantoms.jl).
This page was generated from a single Julia file:
[01-overview.jl](@__REPO_ROOT_URL__/01-overview.jl).
=#

#md # In any such Julia documentation,
#md # you can access the source code
#md # using the "Edit on GitHub" link in the top right.

#md # The corresponding notebook can be viewed in
#md # [nbviewer](https://nbviewer.org/) here:
#md # [`01-overview.ipynb`](@__NBVIEWER_ROOT_URL__/01-overview.ipynb),
#md # and opened in [binder](https://mybinder.org/) here:
#md # [`01-overview.ipynb`](@__BINDER_ROOT_URL__/01-overview.ipynb).
#srcURL


# ### Setup
Expand All @@ -41,9 +28,9 @@ using InteractiveUtils: versioninfo
isinteractive() ? jim(:prompt, true) : prompt(:draw);


# ### Overview

#=
## Overview
When developing image reconstruction methods,
it can be helpful to simulate data (e.g., sinograms)
using software-defined images called phantoms.
Expand All @@ -56,9 +43,9 @@ image = shepp_logan(256) # CT version by default
jim(image, "SheppLogan"; clim=(0.9, 1.1))


# ## Sinograms

#=
## Sinograms
Often for image reconstruction algorithm development,
we need not only the phantom image, but also its
[sinogram, i.e., Radon transform](https://en.wikipedia.org/wiki/Radon_transform)
Expand Down Expand Up @@ -462,7 +449,7 @@ jim(p0a, p1a)


#=
### Spectra rotation
## Spectra rotation
The `spectrum` method
accounts for the translation, rotation, and scaling
Expand Down Expand Up @@ -495,13 +482,4 @@ kspace0r = spectrum(kr, [ellipsoid0]) # evaluate spectrum at rotated tuples
@assert kspace0r kspace1


# ## Reproducibility

# This page was generated with the following version of Julia:

io = IOBuffer(); versioninfo(io); split(String(take!(io)), '\n')


# And with the following package versions

import Pkg; Pkg.status()
include("../../../inc/reproduce.jl")
35 changes: 12 additions & 23 deletions docs/lit/examples/02-ellipse.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
#---------------------------------------------------------
# # [Ellipse](@id 02-ellipse)
#---------------------------------------------------------

#=
# [Ellipse](@id 02-ellipse)
This page illustrates the `Ellipse` shape in the Julia package
[`ImagePhantoms`](https://github.com/JuliaImageRecon/ImagePhantoms.jl).
This page was generated from a single Julia file:
[02-ellipse.jl](@__REPO_ROOT_URL__/02-ellipse.jl).
=#

#md # In any such Julia documentation,
#md # you can access the source code
#md # using the "Edit on GitHub" link in the top right.

#md # The corresponding notebook can be viewed in
#md # [nbviewer](https://nbviewer.org/) here:
#md # [`02-ellipse.ipynb`](@__NBVIEWER_ROOT_URL__/02-ellipse.ipynb),
#md # and opened in [binder](https://mybinder.org/) here:
#md # [`02-ellipse.ipynb`](@__BINDER_ROOT_URL__/02-ellipse.ipynb).
#srcURL


# ### Setup
Expand All @@ -41,9 +28,9 @@ default(markerstrokecolor=:auto)
isinteractive() ? jim(:prompt, true) : prompt(:draw);


# ### Overview

#=
## Overview
A useful shape
for constructing 2D digital image phantoms
is the ellipse,
Expand Down Expand Up @@ -88,7 +75,7 @@ area = IP.area(ob)


#=
### Spectrum using `spectrum`
## Spectrum using `spectrum`
There are two ways to examine the spectrum of this image:
* using the analytical Fourier transform of the object via `spectrum`
Expand Down Expand Up @@ -122,10 +109,12 @@ p4 = jim(axesf(ig), 1e3*abs.(spectrum_fft - spectrum_exact),
jim(p1, p4, p2, p3)


# ### Radon transform using `radon`
#=
## Radon transform using `radon`
# Examine the Radon transform of the object using `radon`,
# and validate it using the projection-slice theorem aka Fourier-slice theorem.
Examine the Radon transform of the object using `radon`,
and validate it using the projection-slice theorem aka Fourier-slice theorem.
=#

dr = 0.2mm # radial sample spacing
nr = 2^10 # radial sinogram bins
Expand All @@ -149,7 +138,7 @@ but one could make a fan-beam sinogram by sampling `(r, ϕ)` appropriately.
=#


# ### Fourier-slice theorem illustration
# ## Fourier-slice theorem illustration

# Pick one particular view angle (55°) and look at its slice and spectra.
ia = argmin(abs.(ϕ .- 55°))
Expand Down
35 changes: 12 additions & 23 deletions docs/lit/examples/03-rect.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
#---------------------------------------------------------
# # [Rectangle](@id 03-rect)
#---------------------------------------------------------

#=
# [Rectangle](@id 03-rect)
This page illustrates the `Rect` shape in the Julia package
[`ImagePhantoms`](https://github.com/JuliaImageRecon/ImagePhantoms.jl).
This page was generated from a single Julia file:
[03-rect.jl](@__REPO_ROOT_URL__/03-rect.jl).
=#

#md # In any such Julia documentation,
#md # you can access the source code
#md # using the "Edit on GitHub" link in the top right.

#md # The corresponding notebook can be viewed in
#md # [nbviewer](https://nbviewer.org/) here:
#md # [`03-rect.ipynb`](@__NBVIEWER_ROOT_URL__/03-rect.ipynb),
#md # and opened in [binder](https://mybinder.org/) here:
#md # [`03-rect.ipynb`](@__BINDER_ROOT_URL__/03-rect.ipynb).
#srcURL


# ### Setup
Expand All @@ -41,9 +28,9 @@ default(markerstrokecolor=:auto)
isinteractive() ? jim(:prompt, true) : prompt(:draw);


# ### Overview

#=
## Overview
A useful shape
for constructing 2D digital image phantoms
is the rectangle,
Expand Down Expand Up @@ -88,7 +75,7 @@ area = IP.area(ob)


#=
### Spectrum using `spectrum`
## Spectrum using `spectrum`
There are two ways to examine the spectrum of this image:
* using the analytical Fourier transform of the object via `spectrum`
Expand Down Expand Up @@ -122,10 +109,12 @@ p4 = jim(axesf(ig), 1e3*abs.(spectrum_fft - spectrum_exact),
jim(p1, p4, p2, p3)


# ### Radon transform using `radon`
#=
## Radon transform using `radon`
# Examine the Radon transform of the object using `radon`,
# and validate it using the projection-slice theorem aka Fourier-slice theorem.
Examine the Radon transform of the object using `radon`,
and validate it using the projection-slice theorem aka Fourier-slice theorem.
=#

dr = 0.2mm # radial sample spacing
nr = 2^10 # radial sinogram bins
Expand All @@ -149,7 +138,7 @@ but one could make a fan-beam sinogram by sampling `(r, ϕ)` appropriately.
=#


# ### Fourier-slice theorem illustration
# ## Fourier-slice theorem illustration

# Pick one particular view angle (55°) and look at its slice and spectra.
ia = argmin(abs.(ϕ .- 55°))
Expand Down
36 changes: 12 additions & 24 deletions docs/lit/examples/04-gauss.jl
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
#---------------------------------------------------------
# # [2D Gaussian](@id 04-gauss)
#---------------------------------------------------------

#=
# [2D Gaussian](@id 04-gauss)
This page illustrates the `Gauss2` shape in the Julia package
[`ImagePhantoms`](https://github.com/JuliaImageRecon/ImagePhantoms.jl).
This page was generated from a single Julia file:
[04-gauss.jl](@__REPO_ROOT_URL__/04-gauss.jl).
=#

#md # In any such Julia documentation,
#md # you can access the source code
#md # using the "Edit on GitHub" link in the top right.

#md # The corresponding notebook can be viewed in
#md # [nbviewer](https://nbviewer.org/) here:
#md # [`04-gauss.ipynb`](@__NBVIEWER_ROOT_URL__/04-gauss.ipynb),
#md # and opened in [binder](https://mybinder.org/) here:
#md # [`04-gauss.ipynb`](@__BINDER_ROOT_URL__/04-gauss.ipynb).

#srcURL

# ### Setup

Expand All @@ -41,9 +27,9 @@ default(markerstrokecolor=:auto)
isinteractive() ? jim(:prompt, true) : prompt(:draw);


# ### Overview

#=
## Overview
A useful shape
for constructing 2D digital image phantoms
is the 2D Gaussian,
Expand Down Expand Up @@ -88,7 +74,7 @@ area = IP.area(ob)


#=
### Spectrum using `spectrum`
## Spectrum using `spectrum`
There are two ways to examine the spectrum of this image:
* using the analytical Fourier transform of the object via `spectrum`
Expand Down Expand Up @@ -126,10 +112,12 @@ p4 = jim(axesf(ig), 1e3*abs.(spectrum_fft - spectrum_exact),
jim(p1, p4, p2, p3)


# ### Radon transform using `radon`
#=
## Radon transform using `radon`
# Examine the Radon transform of the object using `radon`,
# and validate it using the projection-slice theorem aka Fourier-slice theorem.
Examine the Radon transform of the object using `radon`,
and validate it using the projection-slice theorem aka Fourier-slice theorem.
=#

dr = 0.2mm # radial sample spacing
nr = 2^10 # radial sinogram bins
Expand All @@ -153,7 +141,7 @@ but one could make a fan-beam sinogram by sampling `(r, ϕ)` appropriately.
=#


# ### Fourier-slice theorem illustration
# ## Fourier-slice theorem illustration

# Pick one particular view angle (55°) and look at its slice and spectra.
ia = argmin(abs.(ϕ .- 55°))
Expand Down
Loading

0 comments on commit 63d0258

Please sign in to comment.