Choosing an algorithm#
TIGRE has around 30 reconstruction algorithms. They all take the same four inputs (projections, geometry, angles and, for iterative ones, the number of iterations), so trying several on the same data is cheap.
import tigre.algorithms as algs
img_fdk = algs.fdk(proj, geo, angles)
img_sart = algs.ossart(proj, geo, angles, 20)
img_cgls = algs.cgls(proj, geo, angles, 15)
img_tv = algs.asd_pocs(proj, geo, angles, 20)
img_fdk = FDK(proj, geo, angles);
img_sart = OS_SART(proj, geo, angles, 20);
img_cgls = CGLS(proj, geo, angles, 15);
img_tv = ASD_POCS(proj, geo, angles, 20);
Where to start#
Plenty of good-quality projections, circular scan: start with FDK (cone beam) or FBP (parallel beam). They take one pass and are usually the right answer for well-sampled data.
Fewer projections or noisier data: try OS-SART or CGLS. OS-SART is robust and easy to use. CGLS reaches a low data error in very few iterations (often 10 to 30), but it starts to fit the noise if you run it for too long, so stop early.
Very few projections, limited angle or very noisy data: use a total variation (TV) method such as OS-ASD-POCS, FISTA or OS-SART-TV. They assume the object is made of regions of nearly constant value, which suits most real objects, and can produce good images from poor data. They are slower and their parameters need tuning.
Scans that are not a circle (arbitrary rotation axes, some helical or moving-source geometries): FDK assumes a circular trajectory, so use an iterative algorithm.
Low-count data: MLEM (and OSEM in MATLAB) model Poisson noise in the measurements.
A previous image of the same object is available (for example a planning CT): PICCS uses it as a prior.
Then compare: the algorithm demos (6 to 9 and 20) reconstruct the same phantom with each family, so you can see the trade-offs.
Algorithm families#
Filtered backprojection#
Algorithm |
Python |
MATLAB |
|---|---|---|
FDK, cone beam |
|
|
FBP, parallel beam |
|
|
Both accept a filter option: ram_lak (default), shepp_logan,
cosine, hamming or hann. Smoother filters reduce noise at the cost of
resolution. On short scans (less than a full circle), FDK applies Parker
weights so that rays measured twice are not counted twice; turn them off with
parker=False ('parker', false in MATLAB). When the detector is shifted
(offDetector, as in half-fan scans), FDK applies Wang weights on
full-circle scans and skips them on short scans, where they would leave
shading (demo 26).
SART family#
Algebraic methods that update the image using the error in the projections. They differ in how many projections they use per update:
Algorithm |
Python |
MATLAB |
Projections per update |
|---|---|---|---|
SART |
|
|
1 |
OS-SART |
|
|
|
SIRT |
|
|
all |
SART converges in the fewest iterations but each iteration is slowest. SIRT is the opposite. OS-SART sits in between and is usually the best choice.
Krylov subspace methods#
Fast least-squares solvers. They use the matched backprojector, see
Projection and backprojection.
Algorithm |
Python |
MATLAB |
|---|---|---|
CGLS |
|
|
LSQR |
|
|
LSMR |
|
|
Hybrid LSQR |
|
|
AB-GMRES, BA-GMRES |
|
|
IRN-TV-CGLS |
|
|
Hybrid flexible LSQR with TV |
|
|
CGLS, LSQR and LSMR need early stopping. Hybrid LSQR adds Tikhonov
regularisation and chooses its strength at every iteration (by generalised
cross validation, or by the discrepancy principle if you give the noise level
with noiselevel / 'Noiselevel'), which makes it much less sensitive to the
number of iterations; set lmbda / 'lambda' to fix it yourself. AB-GMRES
and BA-GMRES are designed for projector pairs that are not exact transposes.
The last two add TV regularisation.
Total variation#
These alternate a data step (SART-like) with a step that lowers the image’s total variation.
Algorithm |
Python |
MATLAB |
|---|---|---|
ASD-POCS |
|
|
Adaptive-weighted ASD-POCS (edge preserving) |
|
|
PCSD (chooses some ASD-POCS parameters for you) |
|
|
Adaptive-weighted PCSD |
|
|
SART-TV |
|
|
FISTA, ISTA with a TV proximal step |
|
|
The os_ versions use subsets of projections, like OS-SART, and are faster.
The options that matter most:
ASD-POCS:
maxl2err(called epsilon in the paper; the data error the image is allowed to keep),alpha(TV step size) andtviter(TV steps per iteration). See demo 9.FISTA:
hyper(an estimate of the largest eigenvalue of \(A^T A\)),tviterandtvlambda. See demo 20.
Prior image#
When an earlier image of the same object is available (a planning CT, or a scan from a previous visit), prior image constrained compressed sensing (PICCS) uses it to reconstruct from far fewer or noisier projections. It works like ASD-POCS, but the regularisation is a mix of the TV of the image and the TV of its difference from the prior, so the reconstruction keeps the prior’s structure where the data agree with it and departs from it where they do not.
Algorithm |
Python |
MATLAB |
|---|---|---|
PICCS |
|
|
Pass the prior image with prior= in Python, or as the fifth argument in
MATLAB (PICCS(proj, geo, angles, niter, prior)); prior_ratio (default
0.2) weights the prior term against the plain TV term. The prior must be
aligned with the current scan. See MATLAB demo 24.
Statistical#
Algorithm |
Python |
MATLAB |
|---|---|---|
MLEM |
|
|
OSEM |
|