Make auto threshold regression commutative wrt. channels
This fixes a long standing issue in Coloc 2: So far the auto threshold
regression returned in some situations different values for two images
A and B when called atr(A, B) and atr(B, A). It should return the same
values, regardless of order. This commit fixes the issue by having the
working threshold always work on the image with the highest data range
(to make potentially more fine grained steps).
With this commit, the commutativity unit test for the auto threshold
regression passes. The other algorithms are now also commutative. Test
cases for this are included.
Thanks to Birgit Möller and Dan White for bringing this to my attention.