Dual-energy CBCT#

TIGRE includes a dual-energy plugin for Python and MATLAB. It takes two scans of the same object at different tube voltages (for example 80 and 140 kV) and makes virtual monoenergetic (VM) images: images as if the object had been scanned with a single X-ray energy. The method is Keeler et al. (2024); cite it if you use the plugin.

It works in three steps:

  1. DeDecompose pairs each high-kV projection with the low-kV projection at the same angle, and maps every pixel pair to the thicknesses of two basis materials (Al and PMMA by default) with calibrated third-degree polynomials.

  2. MakeVMproj combines the two thicknesses into the projection at one energy, mu1(E)·t1 + mu2(E)·t2, with attenuation coefficients from NIST.

  3. Any TIGRE algorithm reconstructs the VM projections.

The plugin is plain Python and MATLAB code, so it needs no build and is always there. It lives in Python/tigre/plugins/dual_energy and MATLAB/Plugins/DualEnergy; its data (calibration and attenuation tables) is in Common/data. The function reference is in the API pages (Python, MATLAB).

Example#

from tigre.plugins.dual_energy import DeDecompose, MakeVMproj
import tigre.algorithms as algs

# proj_l, angles_l: low-kV scan; proj_h, angles_h: high-kV scan; same geo
Al_proj, PMMA_proj, angles = DeDecompose(
    proj_l, angles_l, proj_h, angles_h,
    scanner="VarianTrueBeam", kVl=80, kVh=140, material1="Al", material2="PMMA",
)
VM_proj = MakeVMproj(Al_proj, PMMA_proj, 60, material1="Al", material2="PMMA")  # 60 keV
img = algs.fdk(VM_proj, geo, angles)
% proj_l, angles_l: low-kV scan; proj_h, angles_h: high-kV scan; same geo
[Al_proj, PMMA_proj, angles] = DeDecompose(proj_l, angles_l, proj_h, angles_h, ...
    'scanner', 'VarianTrueBeam', 'kVl', 80, 'kVh', 140, 'material1', 'Al', 'material2', 'PMMA');
VM_proj = MakeVMproj(Al_proj, PMMA_proj, 60, 'material1', 'Al', 'material2', 'PMMA');  % 60 keV
img = FDK(VM_proj, geo, angles);

The full demo is d23_DualEnergy (Python: Python/demos/d23_DualEnergy.py; MATLAB: MATLAB/Plugins/DualEnergy/Demos/d23_DualEnergy.m). It loads two Varian scans with VarianDataLoader; set its data paths to your own scans.

Matching the two scans#

The two scans rarely have projections at exactly the same angles. The interpolation option sets how the low-kV projection at each high-kV angle is found:

interpolation

Low-kV projection used

'nearest' (default)

The one with the closest angle.

'linear'

Linear interpolation between the closest ones on each side.

'skip'

Like 'nearest', but high-kV projections with no low-kV projection within tolerance radians (default: half the low-kV angular step) are left out.

Angles are compared modulo 2π. The returned angles are the high-kV angles that were kept; reconstruct with those.

Calibration#

The thickness polynomials depend on the scanner and its spectra, so results are only quantitative with a calibration for your scanner. TIGRE has calibrations for one scanner, VarianTrueBeam, at 80/140 kV and 90/140 kV, for Al and PMMA. Without scanner, material1 or material2, the plugin warns and uses these.

To add a scanner, kV pair or material, add its nine coefficients per material to Common/data/dual_energy_calibrations.json (the order of the terms is in DeDecompose), and for a new material its attenuation coefficients to Common/data/NIST_material_attenuation.json. Python and MATLAB both read these files. Contributions are welcome: open a pull request.