CUDA Zeng forward and back projectors in RTK - #977
Open
CoConstan wants to merge 5 commits into
Open
Conversation
axel-grc
reviewed
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add CUDA Zeng forward and back projectors
Summary
This PR adds CUDA implementations of RTK's rotation-based Zeng forward and
back projectors for SPECT reconstruction. The implementation reproduces the
CPU Zeng slice recurrence, including the depth-dependent Gaussian point spread
function (PSF) and optional attenuation correction.
The new projectors operate on
itk::CudaImage<float, 3>and keep their maininputs and outputs on the GPU. They are available from C++, the command-line
applications, iterative reconstruction filters, and Python wrapping.
Main changes
rtk::CudaZengForwardProjectionImageFilter.rtk::CudaZengBackProjectionImageFilter.implementation, including Bessel-based coefficients, normalization, and
constant-zero boundary behavior.
outputs GPU-resident between CUDA filters.
iterative reconstruction subsets.
CudaZengto the forward/back projector selectors used by:rtkforwardprojections;rtkbackprojections;Automated tests
The existing CUDA Zeng tests now cover:
This PR also adds
rtkZengProjectionComparisonCudaTest, which performs directCPU/CUDA comparisons using separate
itk::Imageanditk::CudaImageinputs.It checks:
SigmaZero=1.5andAlpha=0.016;0.01;The comparison tolerances are:
5e-55e-55e-42e-3Measured values on the development system were:
1.31e-51.30e-52.31e-41.23e-3Compute Sanitizer was also run on the forward projector, backprojector, and a
short OSEM reconstruction. It reported zero memory errors and zero leaked
bytes.
Performance
Application-level measurements were made on an NVIDIA RTX 3500 Ada Laptop GPU
using a
64 x 64 x 64volume, 60 projections of64 x 64pixels, 4 mmspacing,
SigmaZero=1.5, andAlpha=0.016.An OSEM benchmark with five iterations and ten projections per subset produced
a median runtime of approximately 5.23 seconds. Persistent workspaces and
shared-memory convolution preserve bit-for-bit identical OSEM output compared
with the previous CUDA implementation.
Validation limitation of the local environment
The complete
RTKCudaTestDrivercannot currently be linked in the developmentenvironment because the installed older CudaCommon version fails while
compiling the unrelated 4D ROOSTER CUDA test. The new Zeng comparison and
adjointness test translation units compile successfully. A standalone driver
was used to execute the new comparison test, and all four comparisons passed.
This limitation is unrelated to the CUDA Zeng implementation and should not be
present with a current compatible ITK/CudaCommon build.