Proton CT#
TIGRE includes a MATLAB extension, written in CUDA, that turns proton CT measurements into optimised proton radiographies, following the method of Collins-Fekete et al. (2016). Protons scatter as they cross the object, so their paths are not straight lines. The extension estimates each proton’s path with a cubic spline and bins its water-equivalent path length (WEPL) along that path.
The radiographies can then be reconstructed with TIGRE’s usual algorithms to give a full proton CT image, or used on their own. A Python version is not available yet.
Building the extension#
From TIGRE’s MATLAB folder, run:
CompilePCT
It asks for a pixel length and an intercepts vector size; press Enter to keep the defaults. If the pixel lengths in x and y differ, enter the smaller one. When the code runs, it reports how many protons it rejected because of the intercepts vector size.
Input data#
Load the measured or simulated data in any format MATLAB reads (.mat or raw
binary files work well). All lengths must be in millimetres.
Parameter |
Name in the demo |
Unit |
|---|---|---|
Water-equivalent path length |
|
mm |
Entry position, x and y |
|
mm |
Exit position, x and y |
|
mm |
Entry direction, x and y |
|
mm, with the z component equal to 1 |
Exit direction, x and y |
|
mm, with the z component equal to 1 |
Before computing the radiography, remove protons with large angular or energy deviations from the data set (3-sigma cuts), or the result will not be reliable.
Computing a radiography#
proj = pCTCubicSpline_mex(posIn, posOut, dirIn, dirOut, Wepl, eIn, geo);
Weplis a vector of length N with the WEPL of each proton.posIn,posOut,dirInanddirOutare vectors of length 2N: first the x values of all protons, then the y values.eInis the initial beam energy, in MeV.
geo uses these fields:
Field |
Meaning |
Unit |
|---|---|---|
|
Pixel size of the radiography |
mm |
|
Size of the radiography in x and y (two values) |
mm |
|
Distance from the source to the origin (positive) |
mm |
|
Distance from the source to the entry detector (positive) |
mm |
|
Distance from the source to the exit detector (positive) |
mm |
|
|
|
|
Convex hull parameters |
mm |
The origin is at the centre of the object. Set h = 0 to compute without a
convex hull. Otherwise the hull is the elliptical cylinder
that is, an ellipse rotated by \(\alpha\) around the y axis.
Testing#
MATLAB/Demos/pRad_demo.m computes one optimised radiography in parallel
geometry from a simulated test data set (loaded with pCTdata, in
MATLAB/Test_data/pCT_test_data). Run it to check
that the extension works on your system.
Notes#
If
CompilePCTfails with missing symbols, check that thelibstdc++shipped with MATLAB is compatible with your CUDA version and your system’sgcc.The extension was tested on Debian 10 with CUDA 11.2, an NVIDIA RTX 4000, and MATLAB R2020b and R2021b.