Page 1 of 1

large tifs, corrupted pixel values in OMERO import

PostPosted: Fri Jan 12, 2018 10:36 pm
by dsudar
Hi team,

I've split this topic out from my earlier post http://www.openmicroscopy.org/community ... =13&t=8374 because it really is a different topic. This is specifically about the corrupted display and pixel values (when examined using iviewer) when importing large XY-extent images that require pyramid-ing when imported into OMERO. I originally reported on this behaviour with Zeiss Axioscan CZI files but as demonstrated with QA file id 18868, the same happens with some fairly regular tif files.

I looked a little further and found that I can read that file into Fiji (with BF 4.7.3) and it looks perfectly fine with correct pixel values. When I "Bio-Formats Exporter" it as either a TIFF or OME.TIFF file, the resulting file has the same problems as the original when imported into OMERO 5.4.1. However, when I "Save As"->Tiff from Fiji using the regular Fiji method, the resulting file imports fine into OMERO and the pixel values are all correct as viewed using iviewer 0.4.1.

I used showinf and tiffinfo to look for differences between the original file, the Bio-Formats Exported file, and the tiff created by Fiji, nothing jumps out except that the Fiji tiff is big endian while the others are all little endian and that the compression and the Rows/Strip is different.

Hopefully this provides another clue towards solving this issue.

Cheers,
- Damir

Re: large tifs, corrupted pixel values in OMERO import

PostPosted: Sat Jan 13, 2018 2:52 am
by dsudar
Quick followup: I tried converting the "original" TIFF file from little endian encoding to big endian encoding using ImageMagick and surprise: that works. So my current thinking is that somewhere in the OMERO importer when creating pyramids, there is some kind of mishandling of little endian encoded pixel values.
- Damir

Re: large tifs, corrupted pixel values in OMERO import

PostPosted: Wed Jan 17, 2018 7:40 am
by Dominik
Hi Damir,
sorry for the late reply. Yes, for some reason the importer thinks it's big endian. I'm still trying to find out why/where this happens. Definitely trying to get that fixed for 5.4.3. As 5.4.2 is coming out soon, it's probably a bit too late to get it in there.

Regards,
Dominik

Re: large tifs, corrupted pixel values in OMERO import

PostPosted: Wed Jan 17, 2018 7:13 pm
by dsudar
Hi Dominik,

Glad you were able to confirm my observations. One additional observation: this behaviour only appears to occur when the image is large enough to require pyramid'ing. When I crop the image down to 3000 by 3000 during the ImageMagick processing, both the big endian and little endian versions of the image import fine. So probably good to focus on the code that does the pyramid construction.

Also, my guess is that this exact same problem is in play for CZI files that require pyramid construction during import. This is the issue I originally reported and is tracked in Trello (https://trello.com/c/ZMZP2rVv/211-rende ... ne-bug-czi). While I cannot tell for sure, I imagine those files are also little endian encoded. And again, if the CZI file has the pyramids already, there's no problem with the import.

Cheers,
- Damir