aprict is an actively developed Python library for CUDA-accelerated simulation and reconstruction in transmission computed tomography. This software is available under the GPLv3+ license. The source code is on GitHub. Documentation is available online.

Example with rock phantom

An analytical phantom was constructed to resemble a double-chambered tube of rocks. The phantom has a radius of about 2.9mm and a height of 20mm. It consists of more than 100,000 ellispoids, truncated cones, and cylinders. It is defined in FORBILD format.

Rock phantom slices

Depicted here are slices of the analytical phantom. There are various features designed to make the object challenging to reconstruct, including the high-frequency knurling along the z axis, and the spherical cavities in the container (some of which are quite tiny, and serve as good target features to measure reconstruction performance).
The x=0 slice of the phantom (anti-aliased). Plotting range: [0, 2] mm^-1.
The z=0 and z=-1mm slices of the phantom, respectively (anti-aliased). Plotting range: [0, 2] mm^-1.

Imaging geometry

Cone-beam data was simulated from this object. The X-ray source points comprised an evenly-sampled cylinder of height 10mm and radius 4.88mm. Here's a diagram of that, and a couple of sample cone-beam projections on the side:
Two sample cone-beam projections. Plotting range of line attenuation: 0 to 5.5. Full resolution of each: 1504 x 752. Each pixel value was computed by averaging 5 x 5 = 25 exact line integrals through the analytically-defined phantom.
The geometry file was generated with the following command:
    #!/usr/bin/env bash
    aprict make-geom cone-cyl \
	--R 4.88 \
	--h 10 \
	--pixwid 0.278 \
	--pixhei 0.278 \
	--nu 1504 \
	--nv 752 \
	--output projgeom.json \
	--num 10000 \
	--type LDS_SIMPLE \
	--L-minus-R 272
    
The resulting projgeom.json file can be viewed here.

To produce the projection data, the following command was run on a machine with an RTX 6000 Pro:

    #!/usr/bin/env bash
    aprict project cbfp \
	--geom projgeom.json \
	--phantom-preset ROCK_CAN \
	--ssu 5 \
	--ssv 5 \
	--output projs \
	--out-dtype FP32 \
	--plot-mode NONE
    
This took about 3.5 days to finish. It took so long because the line integrals are computed exactly by computing the line intersections with the primitive objects that comprise the volume. There are over 100,000 primitive objects in this phantom. Also, the projection data is accurate: the line attenuation for each pixel was computed as the average of 5 x 5 = 25 exact line integrals through the analytically-defined phantom.

Reconstruction

One of my exact reconstruction methods for this geometry is Global Backprojection-Convolution (GBC). Using aprict from the commandline is simple. In this case, I ran the following command:
    #!/usr/bin/env bash
    aprict recon gbc-cone-cyl \
        --volshape '(1300,1300,650)' \
        --voxwid 0.005 \
        --geom projs/projgeom.json \
        --projs projs/projs.npy \
        --plot-mode PYQTGRAPH \
        --memmap-vols False \
        --alg GREWAR \
        --output recon_gbc \
        --plotmin -0.125 \
        --plotmax 2.125
    
The log file for the reconstruction can be viewed here. Reconstruction of a volume size 1300 x 1300 x 650 voxels from 8,000 projections took less than 6 minutes with an NVIDIA RTX 3090. I added --slice-projs '(0,X)' to the above command so that I could select the first X source points. (The source points are distributed in a low-discrepancy sequence, so the first X is approximately uniformly distributed around the object, for any X.) Here's what the reconstructions look like, using a varying number of source points.

The z=-1mm and x=0 slices of a GBC reconstruction, respectively. Plotting range: [-0.125, 2.125] mm^-1.