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

Tjelvar Olsson (JIC) Tjelvar.Olsson at jic.ac.uk
Mon Aug 8 11:45:58 BST 2016


Dear Roger,

Thank you for your explanation. It makes sense.

However, I think it would be useful if it was possible to convert the images with the colour map stripped out, i.e. replicating the previous behaviour of bfconvert. This enables the creation of TIFF files that can be more easily understood by computers. In this case the colour map does not contain "information", it is rather a means to aid the human looking at the image. From the computer's point of view this information is stored in the channel index.

Would it be possible to add a flag to the bfconvert tool not to transcribe the color map?

Kind regards,

Tjelvar

--
Dr. Tjelvar Olsson
Scientific Computing Lab Manager
John Innes Centre
Genome Centre 105b, ext: 2587

> On 29 Jul 2016, at 11:02, Roger Leigh <rleigh at dundee.ac.uk> wrote:
> 
> 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
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel



More information about the ome-devel mailing list