[ome-devel] bfconvert 5 produces 16-bit tiff files that cannot be read by freeimage

Roger Leigh rleigh at dundee.ac.uk
Fri Jul 29 11:02:22 BST 2016


On 28/07/2016 09:51, Tjelvar Olsson (JIC) wrote:
> Dear Roger,
>
> Thank you for getting back to me.
>
> The "showinf" tool did not reveal the difference you outlined.Both seem to be recognised as false color with 16-bit LUT.  I have attached the output from the command.
>
> I have uploaded the image using the link you provided. The file is called:
>
> Col0-NV-Sense-mRNA670+Unspl570_01.czi

Thanks, I have got it and run some tests.

          4.4          5.x
CZI      Indexed      Indexed
OME-TIFF Min-is-black Palette+colourmap

The reason for the change is a bugfix to the ImageConverter class
(bfconvert command):
https://github.com/openmicroscopy/bioformats/commit/9acfa986  This isn't
specific to CZI; it's a general change to bfconvert for all images with
lookup tables.  Prior to this change, lookup tables were preserved only
if they were 8-bit; after this change 16-bit lookup tables were also
copied from the source file to the destination TIFF.

 From a technical point of view, the change is correct and the TIFF
files being written are also correct.  The OME-TIFFs which are being
created by 4.4 are correct but missing the lookup table; and that's
solely due to a missing copy in the converter--they should have been
created like this for 4.4 as well were it not for this omission.

You could read these TIFFs if FreeImage could support
PHOTOMETRIC_PALETTE.  It doesn't even need to treat the pixel data any
differently than MIN_IS_BLACK; the raw data is exactly the same in both
cases--you can completely ignore the colourmap if you wish.  Adjusting
the conditional to treat it the same as MIN_IS_BLACK should be
sufficient (though this isn't a universal rule since the raw data isn't
guaranteed to be usable directly for all indexed images, but it is for
OME-TIFF where the source data was also usable directly).

I hope this explains the reason for the change.  I'm sorry I don't have
any better workaround at this time; tweaking the TIFF to change the
photometric interpretation back to min-is-black would make it work if
adjusting FreeImage isn't possible.


Regards,
Roger

--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
School of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364

The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list