CERN / TIGRE

TIGRE: Tomographic Iterative GPU-based Reconstruction Toolbox
BSD 3-Clause "New" or "Revised" License
581 stars 190 forks source link

float precision fix for issue #544 #555

Closed simonCtBern closed 5 months ago

simonCtBern commented 5 months ago

Changed the function computeDeltasCube() in voxel_backprojection.cu to double precision, including double precision versions of coordinate rotation functions. Added a double precision Point3Ddouble struct to types_TIGRE.hpp. Integrated the computeDeltas_Siddon() function in Siddon_projection.cu from IbexInnovations related to issue https://github.com/CERN/TIGRE/issues/355.

AnderBiguri commented 5 months ago

Thanks a lot! I think this would also need to be propagated to at least voxel_backprojection2.cu. Are you happy to do it or should I do it?

AnderBiguri commented 5 months ago

Thanks! I'll test it for sanity check and merge :)

simonCtBern commented 5 months ago

Yes I wanted to comment that I only copied the changes to voxel_backprojection2.cu, but I don't know where this function is called, so I couldn't test it. Also, I simply copied the coordinate rotation functions to voxel_backprojection2.cu since I don't really know the structure of the code, so they are defined identically in 2 places now. You'll probably want to clean this up...

AnderBiguri commented 5 months ago

hi @simonCtBern , I have done a commit to this PR, do you mind double checking the code for sanity? Just run whatever experiment this was fixing, just to make sure I haven't broken it :) Otherwise it runs on my PC locally with the same behaviour as before my commit.

simonCtBern commented 5 months ago

@AnderBiguri Looks good, the inaccuracy is still gone after pulling and recompiling.

AnderBiguri commented 5 months ago

Thanks @simonCtBern for the help on this !