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 #9344 (closed)

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

Bug: differences in re-imported downgraded PNGs

Reported by: jamoore Owned by: mlinkert
Priority: major Milestone: OMERO-4.4.4
Component: General Version: n.a.
Keywords: n.a. Cc: mlinkert, jburel, ajpatterson
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

Not sure if this is expected or even explainable, but it's certainly interesting. I imported a PNG, then exported it with every schema (other than 2003 FC). I then re-imported each of those files. The results are in the screenshot in chronological schema order from right to left ascending (i.e. oldest on the left, newest on the right).

Attachments (2)

ss-insight-downgrade-reimport.png (113.7 KB) - added by jmoore 9 years ago.
9344-fixed.png (194.4 KB) - added by mlinkert-x 9 years ago.

Download all attachments as: .zip

Change History (14)

Changed 9 years ago by jmoore

comment:1 Changed 9 years ago by jmoore

  • Summary changed from Bug: differences in re-importer downgraded PNGs to Bug: differences in re-imported downgraded PNGs

comment:2 Changed 9 years ago by mlinkert

  • Owner set to mlinkert-x

Assigning to myself for preliminary investigation.

comment:3 Changed 9 years ago by mlinkert

The issues are:

  • 2011-06: not correctly detected as OME-TIFF
  • 2010-04 and older: Channel.Color not preserved; it is set to white across the board

comment:4 Changed 9 years ago by mlinkert

  • Cc ajpatterson added

Andrew, how feasible do you think it would be to preserve the (Logical)Channel.Color when downgrading to 2010-04 or earlier? Right now, if we have a 2012-06 file with 3 Channels colored red, green, and blue, those colors will be set to white when downgrading to 2010-04 or earlier.

comment:5 Changed 9 years ago by mlinkert

Reading of 2011-06 downgraded file is fixed with this commit: https://github.com/melissalinkert/bioformats/commit/bb073ad43a25f6f6680a46fdf644b5990d60f73d

comment:6 Changed 9 years ago by ajpatterson

I checked and the problem is the downgrade path for the metadata is down to 2008-02, then upgrade from there. Color did not come in to Channel until 2009-09. It is constructed from something called ColorDomain (a string in ChannelComponent) using a function in the transform that is very crude:

		<xsl:choose>
			<xsl:when test="contains($cc,'red') or contains($cc,'r')">4278190335</xsl:when>
			<xsl:when test="contains($cc,'green') or contains($cc,'g')">16711935</xsl:when>
			<xsl:when test="contains($cc,'blue') or contains($cc,'b')">65535</xsl:when>
			<xsl:otherwise>4294967295</xsl:otherwise>
		</xsl:choose>

There is no reverse function in the downgrade, the value is just dropped.

If a function was written and added to 2010-06-to-2008-02 making a ColorDomain then it should work. But the function would have to map colours to names and the names be added to the upgrade too.

Last edited 9 years ago by ajpatterson (previous) (diff)

comment:7 Changed 9 years ago by mlinkert

  • Owner changed from mlinkert-x to ajpatterson

comment:9 Changed 9 years ago by ajpatterson

  • Owner changed from ajpatterson to mlinkert-x

comment:10 Changed 9 years ago by mlinkert

  • Resolution set to fixed
  • Status changed from new to closed

All looking good when downgrading and re-importing with a build of Insight that has Andrew's and my commits - see attached new screenshot.

Changed 9 years ago by mlinkert-x

comment:11 Changed 9 years ago by Andrew J Patterson <workonly@…>

(In [26ea06bd0f05aa7fe56f326fce883ca954408ef4/ome.git] on branch develop) Adding support for r,g,b channel colors, see #9344

Conflicts:

components/tools/OmeroPy/scripts (was folder, no submodule, action to fix: reset)

comment:12 Changed 9 years ago by Josh Moore <josh@…>

(In [743f819ef797763c7c9e466767dd8c25ee1985eb/ome.git] on branch develop) Merge pull request #275 from qidane/develop-9344-fix

Adding support for r,g,b channel colors, see #9344

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.65888 sec.)

We're Hiring!