Skip to content

Commit 5f89470

Browse files
committed
Update readme with init usage text
1 parent bc048c1 commit 5f89470

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
11
# AbstractImageReconstruction
22

33
[![Build Status](https://github.com/JuliaImageRecon/AbstractImageReconstruction.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/JuliaImageRecon/AbstractImageReconstruction.jl/actions/workflows/CI.yml?query=branch%3Amain)
4+
5+
This package contains an interface and type hierarchy for image reconstruction algorithms and their parameters, together with associated utiltiy tools.
6+
7+
## Installation
8+
9+
Within Julia, use the package manager:
10+
```julia
11+
using Pkg
12+
Pkg.add("AbstractImageReconstruction")
13+
```
14+
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)
15+
16+
## Usage
17+
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:
18+
```julia
19+
using AbstractImageReconstruction, MPIReco
20+
21+
params = ... # Setup reconstruction paramter
22+
algo = ... # Setup chosen algorithm with params
23+
raw = ... # Setup raw data
24+
25+
image = reconstruct(algo, raw)
26+
```
27+
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.
28+
29+
```julia
30+
plan = toPlan(algo)
31+
savePlan(MPIReco, "Example", plan)
32+
plan = loadPlan(MPIReco, "Example", [MPIReco, RegularizedLeastSquares, MPIFiles])
33+
34+
algo2 = build(plan)
35+
algo == algo2 # true
36+
```
37+
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.
38+
39+
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.

0 commit comments

Comments
 (0)