
Hi, On Fri, Jul 23, 2021 at 11:15 PM Stefan van der Walt <stefanv@berkeley.edu> wrote:
On Fri, Jul 23, 2021, at 14:08, Thomas Caswell wrote:
I would caution about restricting to the [0, 1] range in the functions. Internal to imshow in Matplotilb we are currently doing this rescaling (because we are using Agg to do some resampling for us) and it has caused a fair amount of trouble, particularly in images with large dynamic range.
This is the existing arrangement, by the way; we've always assumed and used this inside essentially all algorithms.
You'd need significant dynamic range before floating point distance becomes an issue, I imagine?
Forgive my lack of experience here (I mostly work with neuroimaging images) but does the problem of large dynamic range also argue in favor of asking the user to handle and review the initial conversion to floating point, perhaps with some thoughtful helper routines, rather than doing that automatically inside the called function? Cheers, Matthew