gschramm / parallelproj

code for parallel TOF and NONTOF projections
MIT License
30 stars 9 forks source link

document that the forward projector accumulates #7

Closed KrisThielemans closed 3 years ago

KrisThielemans commented 3 years ago

Admittedly, I didn't read the documentation... But it surprised me that forward projection adds to the existing data (but it's fine, as long as we know)

gschramm commented 3 years ago

Well spotted, this was actually a point where the C/OpenMP and CUDA implementation behaved differently - which was corrected. Now in both implementations the projection arrays are initialized with 0s before the fwd projection is done. Initializing with 0s makes more sense, since in CUDA it avoids unnecessary memory transfer, and the overhead in the OpenMP implementation should be negligible.

The documentation is also updated (mentioning that in the back projection values are added to the existing array).

KrisThielemans commented 3 years ago

ok. I guess we could skip the fill() in STIR then...

gschramm commented 3 years ago

definitely. sorry for the inconvenience.