matbryan52 / image-viewer

MIT License
3 stars 1 forks source link

Preview of large images suppresses values #17

Open uellue opened 6 months ago

uellue commented 6 months ago

Take this image: https://er-c-data-mgmt.fz-juelich.de/browse/?path=/adhoc/pharmaceutical_crystals_tem/2024-04-10-Jennifer-visit/raw/10mM+10e/_0031.dm4

At default zoom level with autorange and viridis it looks like this: image

However, when you zoom in and rescale you get this: image

I'd expect that the full view should also have visible features? What is happening there?

matbryan52 commented 6 months ago

I think this file is Poisson-like noise containing only [0 - 4] ?

image

In LiberTEM-panel-ui the downsampling for display uses a local mean so as the data are fairly uniformly random I am guessing the mean is practically a constant when fully zoomed out.

In DM if I rebin-by-two a few times this also erases the noise :

image

What I can do is expose an option to do nearest-neighbour downsampling, this will preserve noise while potentially producing more jagged downsampled images in other contexts?