Loading scanner data#
TIGRE reconstructs from line integrals: each projection value is \(-\log(I / I_0)\), where \(I\) is the measured intensity and \(I_0\) the intensity with nothing in the beam. The scanner loaders below read a dataset, convert it to line integrals and build the matching geometry and angles, so you can reconstruct straight away.
Supported scanners#
Scanner |
Python ( |
MATLAB |
|---|---|---|
Nikon (XTek) micro-CT |
|
|
Bruker SkyScan |
|
|
YXLON |
|
|
Diondo |
|
|
Varian TrueBeam on-board CBCT |
|
|
DXchange (HDF5, used at synchrotrons) |
|
|
DICOM (tested on Philips Allura only) |
|
import tigre.utilities.io as tigreio
import tigre.algorithms as algs
proj, geo, angles = tigreio.NikonDataLoader("path/to/Nikon/sample/")
img = algs.fdk(proj, geo, angles)
[proj, geo, angles] = NikonDataLoader('path/to/Nikon/sample/');
img = FDK(proj, geo, angles);
Loading part of a dataset#
Micro-CT datasets can have thousands of projections. The Nikon, Bruker, YXLON and Diondo loaders can load a subset:
Option |
Effect |
|---|---|
|
N projections spread evenly over the scan (the default sampling). |
|
Every k-th projection. |
|
The first N projections. |
In MATLAB these are name-value pairs, for example
NikonDataLoader(folder, 'sampling', 'step', 'sampling_step', 10).
Bruker folders sometimes hold more than one dataset; choose one with
dataset_number (a number from 0, or "all" in Python).
Varian on-board CBCT#
VarianDataLoader reads TrueBeam .xim projections and calibration files.
By default it also applies an acceleration-deceleration correction (acdc),
detector point-scatter correction (dps) and kernel-based scatter
correction (sc); each can be switched off with the option of the same name.
It has been tested on clinical data from TrueBeam 2.7. The MATLAB version
has further options, including beam-hardening correction.
Other scanners#
If your scanner is not listed, or it does not save its geometry (some only store the projections), load the data yourself and describe the geometry by hand (Describing your scanner: the geometry). Then check the data before reconstructing:
Convert to line integrals. Plot the projections with
plotproj(Python) orplotProj(MATLAB). Dense material should be bright and air dark. If it is the other way round, the data are still intensities: convert them with \(-\log(I / I_0)\), using a flat-field image or the brightest air value as \(I_0\).Check the orientation. Python projections have shape
(angles, v, u), wherevruns along the rotation axis. The object should rotate left to right as you step through the angles; if it moves up and down, swap the detector axes.Reconstruct with FDK first. If the image looks wrong, check whether the angles need to go the other way, whether the geometry matches the scanner and, for micro-CT, whether halos around features show that the centre of rotation needs correcting (
COR, orcomputeCOR).
If you write a loader for a scanner TIGRE does not support yet and can share it, please open a pull request.