32-bit float ND2s are assumed to be integer by Bio-Formats

Hi Bio-Formats team,

We have users using NIS-Elements to deconvolve their images. Part of this process is that their files are converted to float and so they are resultant files are 32-bit float point ND2s. I started getting reports than when these images were opened in FIJI they “looked weird”. So I had a look at the min/max values in NIS and FIJI and the results are below.

@petebankhead nicely looked into the code a little for me and here is an excerpt of what he said to me

It looks like it’s using the native reader & this line ensures that it isn’t floating point
As you can see by cross-referencing the method:
The legacy ND2 reader makes the opposite choice, passing fp as true:
But unfortunately doesn’t seem capable of opening your image for some other reason (I checked it directly and got an error).

I didn’t get any deeper into it than this, but it looks to me that the code is written so that it assumes 32-bit is always int and never float with the native reader.

I was hoping maybe this could be maybe a not so big change for you guys to fix?

I found it slightly concerning that the files open seemingly fine and it’s not necessarily initially obvious that the values aren’t as expected.

Hi @lmurphy, this looks to be the first time we’ve encountered this variation of an ND2 file. Would you be able to upload a sample file for testing to https://www.openmicroscopy.org/qa2/qa/upload/?

Oh yes, sorry, I started to do that yesterday but must have gotten distracted.

It’s uploaded.

Im afraid something seems to have gone wrong with the upload, I can see you have opened a new QA but there doesn’t seem to be a file attached to it, would you be able to retry?

Okay, done.

I did it twice, second time with a simpler name in case the funny characters in the filename were causing a problem.

Thanks, we have received the file now. I will update this thread once I have been able to test it further.

1 Like