Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #13106 (new)

Opened 6 years ago

Last modified 5 years ago

TiffReader: Does not handle YCbCr conversion

Reported by: rleigh Owned by:
Priority: minor Milestone: Unscheduled
Component: Bio-Formats Version: BIo-Formats-5.1.5
Keywords: TiffReader YCbCr, external Cc: stephane.dallongeville@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.



This contains a sample TIFF with a YCbCr PhotometricInterpretation?. Bio-Formats seems to treat it as plain RGB, which leads to downstream clients such as the ImageJ importer and ImageInfo? displaying garbage since they treat it as RGB.

Examples of how it should display are in
http://lists.openmicroscopy.org.uk/pipermail/ome-users/2015-November/005736.html as well as the other earlier messages in the thread.

Not sure the problem is necessarily in TiffReader?; the model has no concept of PhotometricInterpretation?--maybe we need to add it? If TiffReader? should not convert the data to RGB (and I can see there are good reasons for leaving it untouched), where should this be handled?

Change History (1)

comment:1 Changed 5 years ago by mlinkert

  • Keywords external added
  • Owner mlinkert deleted

It's not entirely true that YCbCr is not supported - plenty of other TIFF files with YCbCr photometric interpretations are read correctly. The problem is this line: https://github.com/openmicroscopy/bioformats/blob/develop/components/formats-bsd/src/loci/formats/tiff/TiffParser.java#L733

...which seems to enable YCbCr correction, when it's actually not necessary (setting options.ycbcr to false results in the same image as shown by ImageMagick?). Worst case, the TIFF reader may need to check the software tag and disable YCbCr correction if NDP.scan is found. Storing PhotometricInterpretation? in the model should definitely not be a prerequisite here.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.62173 sec.)

We're Hiring!