BUG: Match CUDA forward projection clipping with CPU behaviour - #981
Conversation
SimonRit
left a comment
There was a problem hiding this comment.
Thanks for the work, this is great. In addition to my comments below, can you also add a note in documentation/docs/rtk_3_migration_guide.md to indicate the change of behavior. I would also squash the changes in one commit and call this an enhancement (change of behavior) rather than a bug but it's probably a matter of opinion.
9548ff7 to
c33bff8
Compare
SimonRit
left a comment
There was a problem hiding this comment.
Thanks again for the work. Good as is but we need to update rtkCudaRayCastBackProjectionImageFilter.cu accordingly. Do you want to do it in this PR or do you want us to do it in a subsequent PR?
The CUDA forward projector integrated along an infinite ray, allowing attenuation located beyond the detector plane to contribute to the projection. Clip the integration interval to the source-detector segment, matching the behavior of the CPU Joseph forward projector. Add a regression test covering volumes located before, on and beyond the detector.
Restrict CUDA back projection to the source-detector segment, similarly to the CPU implementation. This avoids accumulating contributions beyond the physical ray segment and keeps the back projector consistent with the corresponding forward projector, preserving the adjoint relationship.
c33bff8 to
4e56fbd
Compare
I added a separate commit for the adjoint operator. It includes a regression test that passes only after the corresponding clipping changes in |
SimonRit
left a comment
There was a problem hiding this comment.
Thanks! Will merge when the CI's green.
Fixes #980