fiji / Colocalisation_Analysis

Fiji's plugin for colocalization analysis
http://imagej.net/Coloc_2
GNU General Public License v3.0
24 stars 18 forks source link

Wrong limits of 2D intensity histogram for float or 16-bit input images #71

Open bene51 opened 3 years ago

bene51 commented 3 years ago

Hi,

you can reproduce my issue by creating two new (identical) images of type float, then run Coloc 2 on them.

What I'd expect is a diagonal line (since it's two identical images), and I do get a line indeed, but it's not diagonal (see screenshot below).

When I move the cursor over the 2D histogram, it shows me x/y values from 0 to 255, but the intensities in the input images (being floats) are [0;1], not sure if this is related...

2D_Histogram

Best wishes, Bene

haesleinhuepf commented 3 years ago

Hey @bene51 ,

thanks for reporting! Even more suspicious: I just attempted to reproduce your issue with blobs.gif (8-bit, twice):

image

These were my settings: image

With 16-bit blobs it looks like this btw: image

Let's ping @etadobson and @chalkie666 and see if thay can give us some pointers or hints :-)

Cheers, Robert

chalkie666 commented 3 years ago

Hi folks @bene51 @haesleinhuepf I do remember that if you put 2 identical images as input the maths explodes for some reason that is documented in the code as far as I remember. It's a divide by zero or something like that. Try adding a tiny bit of noise to one if the input images . Maybe it's a bug though...

imagejan commented 3 years ago

@chalkie666 wrote:

the maths explodes for some reason that is documented in the code as far as I remember.

I couldn't find any comment in the source code, but found this note on the wiki page https://github.com/fiji/Colocalisation_Analysis/wiki/DesignNotes:

Test if images are actually identical - warn user (cause numerical problem div 0 in Pearson/Manders?)