UCL / STIR

Software for Tomographic Image Reconstruction
http://stir.sourceforge.net/
Other
111 stars 93 forks source link

accumulate_Hessian_times_input for Poisson...ProjData fails for input containing negatives #1461

Closed KrisThielemans closed 2 months ago

KrisThielemans commented 3 months ago

If input is filled with -1, the output is 0. This will be because we use divide_and_truncate (e.g. here). This function is designed to work for the PoissonLL operations, and truncates negatives to zero. That is incorrect for the multiplication with the Hessian though, as the "input" vector can be anything.

Unfortunately, it doesn't seem to be easy to make the Hessian calculation consistent with the truncation strategy used for the gradient (and value) of the PoissonLL (or at least, do it without becoming quite slow).

KrisThielemans commented 2 months ago

value is computed as https://github.com/UCL/STIR/blob/12bfa873522653936a4818e9bad9b9da41f11706/src/buildblock/recon_array_functions.cxx#L367-L371. Gradient is consistent with that.

KrisThielemans commented 2 months ago

Gradient is consistent with that.

not really, see #1472

KrisThielemans commented 2 months ago

1477 raises an error in this case (it doesn't really fix it though)