RTKConsortium / RTK

Reconstruction Toolkit
Apache License 2.0
241 stars 143 forks source link

BUG: Fix CUDA/CPU inconsistency in DisplacedDetectorImageFilter #533

Closed theysp closed 1 year ago

theysp commented 1 year ago

I have found that for geometry that have negative sdd and sid, which means the projection geometry is described in a right handed coordinate system, the DisplacedDetectorFilter implemented on CUDA behaves differently, and the CUDA version obviously takes the wrong direction of the detector row and gives wrong weights on the padded projections. After looking into the implementation, I have found that the function ToUntiltedCoordinateAtIsocenter has been implemented differently in CUDA and MT versions. I have altered function ToUntiltedCoordinateAtIsocenter in rtkCudaDisplacedDetector.cu, to make it have consistent results with rtkDisplacedDetector.hxx.

This pull request is created as the same BUG: Fix the inconsistency between CUDA and multi-threads(MT) code for negative SourceToDetectorDistance #532. I have revised the commit message, but the message in the above pull request has not been updated. So I have to open a new pull request. Sorry for the inconvenience it has brought.

SimonRit commented 1 year ago

Thanks @theysp!