You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Small Reconstruction Package for Radon projections
2
-
In this example we will implement a small image reconstruction package with the help of `AbstractImageReconstruction.jl`. Our example reconstruction package aims to provide direct and iterative reconstruction algorithms for Radon projection data.
2
+
In this example we will implement a small image reconstruction package using `AbstractImageReconstruction.jl`. Our reconstruction package`OurRadonreco` aims to provide direct and iterative reconstruction algorithms for Radon projection data.
3
3
4
-
Most of the desired functionality is already implemented in various Julia packages. Our reconstruction packages now needs to properly connect these packages and transform the data into the appropriate formats for each package.
4
+
Most of the desired functionality is already implemented in various Julia packages. Our reconstruction package now needs to properly link these packages and transform the data into the appropriate formats for each package.
5
5
6
6
!!! note
7
7
The example is intended for developers of reconstruction packages that use `AbstractImageReconstruction`. End-users of such a package can consult the result sections of the example to see the high-level interface of `AbstractImagerReconstruction` and should otherwise consult the documentation of the concrete reconstruction package itself.
This will download and install AbstractImageReconstruction.jl and its dependencies. To install a different version, please consult the [Pkg documentation](https://pkgdocs.julialang.org/dev/managing-packages/#Adding-packages). In addition to AbstractImageReconstruction.jl, we will need a few more packages to get started, which we can install the same way.
17
17
18
18
19
-
[RadonKA.jl](https://github.com/roflmaostc/RadonKA.jl/tree/main) provides us with fast Radon forward and backprojections, which we can use for direct reconstructions and preparing example data for our package.
19
+
[RadonKA.jl](https://github.com/roflmaostc/RadonKA.jl/tree/main) provides us with fast Radon forward and backward projections, which we can use for direct reconstructions and to prepare sample data for our package.
20
20
21
-
[LinearOperatorCollection.jl](https://github.com/JuliaImageRecon/LinearOperatorCollection.jl) wraps the functionality of RadonKA.jl in a matrix-free linear operator, which can be used in iterative solvers.
21
+
[LinearOperatorCollection.jl](https://github.com/JuliaImageRecon/LinearOperatorCollection.jl) wraps the functionality of RadonKA.jl into a matrix-free linear operator, that can be used in iterative solvers.
22
22
23
-
[RegularizedLeastSquares.jl](https://github.com/JuliaImageRecon/RegularizedLeastSquares.jl) offers a variety of iterative solver and regularization options.
23
+
[RegularizedLeastSquares.jl](https://github.com/JuliaImageRecon/RegularizedLeastSquares.jl) offers a variety of iterative solvers and regularization options.
24
24
25
25
[ImagePhantoms.jl](https://github.com/JuliaImageRecon/ImagePhantoms.jl) and [ImageGeoms.jl](https://github.com/JuliaImageRecon/ImageGeoms.jl) allow us to define digital software "phantoms", which we will use to test our reconstruction algorithms.
26
26
27
27
Lastly, we will use [CairoMakie.jl](https://docs.makie.org/stable/) to visualize our results.
28
28
29
29
## Outline
30
-
[Radon Data](generated/example/0_radon_data.md): In this section we get familiar with RadonKA.jl and define a small dataformat for three-dimensional time-series sinograms. We also create the inverse problem, which we want to solve in the remainder of the example.
30
+
[Radon Data](generated/example/0_radon_data.md): this section we will familiarise ourselves with RadonKA.jl and define a small data format for three-dimensional timeseries sinograms. We also create the inverse problem that we will solve in the rest of the example
31
31
32
32
[Interface](generated/example/1_interface.md): Here we define the abstract types we will use in our package and take a look at what we need to implement to interact with `AbstractImageReconstruction`. We also start with a first processing step of our algorithms.
33
33
34
34
[Direct Reconstruction](generated/example/2_direct.md): Now we extend our abstract types with a concrete implementation of reconstruction algorithms using the backprojection and filtered backprojection.
35
35
36
-
[Direct Reconstruction Result](generated/example/3_direct_result.md): This section shows how to use the algorithm we just implemented.
36
+
[Direct Reconstruction Result](generated/example/3_direct_result.md): This section shows how to use the algorithm we have just implemented.
37
37
38
38
[Iterative Reconstruction](generated/example/4_iterative.md): We finish our small example package by implementing an iterative reconstruction algorithm. For this algorithm we require more complex parametrization and data processing.
39
39
40
-
[Iterative Reconstruction Result](generated/example/5_iterative_result.md): The last section again shows how to use the just implemented algorithm. But it also highlights `RecoPlans`, which are a core utility of `AbstractImageReconstruction`. These plans allow a user to easily configure, store and load algorithms as templates.
40
+
[Iterative Reconstruction Result](generated/example/5_iterative_result.md): The last section shows again how to use the just implemented algorithm. But it also highlights `RecoPlans`, which are a core utility of `AbstractImageReconstruction`. These plans allow a user to easily configure, save and load algorithms as templates.
41
41
42
-
For an even more indepth reconstruction package we refer to the magnetic particle imaging reconstruction package [MPIReco.jl](https://github.com/MagneticParticleImaging/MPIReco.jl).
42
+
For an even more detailed reconstruction package we refer to the magnetic particle imaging reconstruction package [MPIReco.jl](https://github.com/MagneticParticleImaging/MPIReco.jl).
Copy file name to clipboardExpand all lines: docs/src/index.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,14 @@
4
4
5
5
## Introduction
6
6
7
-
AbstractImageReconstruction.jl is a Julia package that serves as the core API for medical imaging packages. It provides implementations an interface and type hierarchy with which one can represent and implement image reconstruction algorithms, their parameters and runtime behaviour. In particular, this package serves as the API of the Julia packages [MPIReco.jl](https://github.com/MagneticParticleImaging/MPIReco.jl).
7
+
AbstractImageReconstruction.jl is a Julia package that serves as the core API for medical imaging packages. It provides implementations an interface and type hierarchy to represent and implement image reconstruction algorithms, their parameters and runtime behaviour. In particular, this package serves as the API of the Julia packages [MPIReco.jl](https://github.com/MagneticParticleImaging/MPIReco.jl).
8
8
9
9
## Features
10
-
10
+
11
+
* Reconstruction control flow defined with multiple-dispatch on extensible and exchangable type hierarchies
11
12
* Storing, loading and manipulating of reconstruction algorithms with (partially) set parameters
12
-
* Attaching callbacks to parameters changes with Observables.jl
13
-
*Transparent caching of intermediate reconstruction results
13
+
* Attaching callbacks to parameter changes with Observables.jl
14
+
*Various generic utilities such as transparent caching of intermediate reconstruction results
AbstractImageReconstruction is not intended to be used alone, but together with an image reconstruction package that implements the provided interface, such as [MPIReco.jl](https://github.com/MagneticParticleImaging/MPIReco.jl).
23
24
24
25
## Usage
25
-
Concrete construction of reconstruction algorithms depend on the implementation of the reconstruction package. Once an algorithms is constructed with the given paramters, images can be reconstructed as follows:
26
+
The actual construction of reconstruction algorithms depends on the implementation of the reconstruction package. Once an algorithm is constructed with the given parameters, images can be reconstructed as follows:
27
+
26
28
```julia
27
29
using AbstractImageReconstruction, MPIReco
28
30
@@ -32,7 +34,7 @@ raw = ... # Setup raw data
32
34
33
35
image =reconstruct(algo, raw)
34
36
```
35
-
Once an algorithm is constructed it can be transformed into a `RecoPlan`. These are mutable and transparent wrappers around the nested types of the algorithm and its paramters, that can be stored and restored to and from TOML files.
37
+
An algorithm can be transformed into a `RecoPlan`. These are mutable and transparent wrappers around the nested types of the algorithm and its parameters, which can be saved and restored to and from TOML files.
Unlike concrete algorithm instances, a `RecoPlan` may still be missing certain values of its fields and it can encode the structure of an image reconstruction algorithm without concrete parameterization.
47
+
Unlike concrete algorithm instances, a `RecoPlan` may still be missing certain values of its properties. Futhermore, they can encode the structure of an image reconstruction algorithm without concrete parameterization.
46
48
47
-
It is also possible to attach `Listeners` to `RecoPlan`fields, that call user-specified functions if they are changed. This allows specific `RecoPlans` to provide smart default paramter choices or embedding a plan into a GUI.
49
+
It is also possible to attach functions to `RecoPlan`properties, that call user-specified functions if they are changed using `Observables.jl`. This allows specific `RecoPlans` to provide smart default parameter choices or embedding a plan into a GUI.
Copy file name to clipboardExpand all lines: docs/src/literate/example/0_radon_data.jl
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
1
# # Radon Data
2
2
3
-
# In this example we will setup our Radon data using RadonKA.jl, ImagePhantoms.jl and ImageGeoms.jl. We will start with simple 2D images and their sinograms and move up to a time series of 3D images and sinograms.
3
+
# In this example we will set up our radon data using RadonKA.jl, ImagePhantoms.jl and ImageGeoms.jl. We will start with simple 2D images and their sinograms and continue with a time series of 3D images and sinograms.
4
4
5
5
# ## Background
6
-
# The Radon transform is a integral transform which projects the values of a function(/or a phantom) along straight lines onto a detector.
6
+
# The Radon transform is an integral transform that projects the values of a function(or a phantom) along straight lines onto a detector.
7
7
# These projections are recorded for a number of different angles and form the so-called sinogram. The Radon transform and its adjoint form the mathematical basis
8
-
# for Computed Tomography (CT) and other imaging modalities such as single photon emission computed tomography (SPECT) and positron emission tomography (PET).
8
+
# for computed tomography (CT) and other imaging modalities such as single photon emission computed tomography (SPECT) and positron emission tomography (PET).
9
9
10
10
# ## 2D Phantom
11
11
# We will use a simple Shepp-Logan phantom to generate our Radon data. The phantom is a standard test image for medical imaging and consists of a number of ellipses with different intensities.
12
-
# It can be generated with ImagePhantoms.jl and ImageGeoms.jl. as follows:
12
+
# It can be generated using ImagePhantoms.jl and ImageGeoms.jl. as follows:
13
13
14
14
using ImagePhantoms, ImageGeoms
15
15
N =256
16
16
image =shepp_logan(N, SheppLoganToft())
17
17
size(image)
18
18
19
19
# This produces a 256x256 image of a Shepp-Logan phantom. Next, we will generate the Radon data using `radon` from RadonKA.jl.
20
-
# The arguments of this function are image or phantom under transformation, the anlges at which the projections are taken, and the used geometry of the system. For this example we will use the default parallel circle geometry.
20
+
# The arguments of this function are the image or phantom to be transformed, the angles at which the projections are taken, and the used geometry of the system. For this example we will use the default parallel circle geometry.
21
21
# For more details, we refer to the RadonKA.jl documentation. We will use 256 angles for the projections, between 0 and π.
0 commit comments