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

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

Bug: Description lost on import if XML

Reported by: wmoore Owned by: bpindelski
Priority: blocker Milestone: 5.0.2
Component: Import Version: n.a.
Keywords: n.a. Cc: java@…, ganchademnes@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description (last modified by jamoore)

From https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7442&p=13607

and https://www.openmicroscopy.org/community/viewtopic.php?f=5&t=7361

An OME.tiff file that has OME-XML in the Description block currently loses this text when imported.

Sample file attached. When opened with LOCI in ImageJ you see the description (OME-XML) but when imported into OMERO this is lost:

omero=# select name, description from image where id=1317;
             name              | description 
-------------------------------+-------------
 descriptionOmeXml.png.ome.tif | 

Attachments (1)

descriptionOmeXml.png.ome.tif (434.8 KB) - added by wmoore 10 years ago.
Imported png to OMERO, edited Description with XML and exported OME.TIFF

Download all attachments as: .zip

Change History (16)

Changed 10 years ago by wmoore

Imported png to OMERO, edited Description with XML and exported OME.TIFF

comment:1 Changed 10 years ago by wmoore

  • Priority changed from major to blocker

Raising the priority since this is a blocker for an external user (and I think it's a regression from OMERO 4.4)

comment:2 Changed 10 years ago by jamoore

  • Cc jburel jamoore added

This is the last un-PR'd blocker for 5.0.1, Melissa. Thoughts on the priority and the timeline?

comment:3 Changed 10 years ago by mlinkert

Leaving the priority as-is, but this isn't likely to happen for 5.0.1. All I know so far is that Bio-Formats is parsing out the correct description and passing that through MetadataStore?, but for whatever reason that gets eaten before being stored in the database. Possible causes are the length or something to do with the fact that the description is XML (e.g. unescaped characters).

comment:4 Changed 10 years ago by mlinkert

  • Milestone changed from 5.0.1 to 5.0.2

comment:5 Changed 10 years ago by jamoore

  • Cc java@… added; jburel jamoore removed
  • Owner mlinkert deleted

Removing Melissa from the owner of this in case someone else can pick it while she focuses on CZI.

comment:6 Changed 10 years ago by bpindelski

  • Owner set to bpindelski

comment:7 Changed 10 years ago by bpindelski

I shall try and investigate what is happening here.

comment:8 Changed 10 years ago by jamoore

  • Cc ganchademnes@… added
  • Description modified (diff)

comment:9 Changed 10 years ago by bpindelski

Initial investigation shows, that it doesn't only apply to XML-type descriptions. Any string added to an image gets saved in the DB, but exporting that image as OME-TIFF an re-importing doesn't preserve the description field.

comment:10 Changed 10 years ago by bpindelski

Digging deeper, https://github.com/openmicroscopy/openmicroscopy/blob/dev_5_0/components/blitz/src/ome/formats/model/PixelsProcessor.java#L195 seems to be the culprit. On dev_4_4 the userSpecifiedDescription manages to stay null. On dev_5_0 and due to the stuff that https://github.com/openmicroscopy/openmicroscopy/blob/dev_5_0/components/blitz/src/ome/services/blitz/repo/ManagedImportRequestI.java#L198 does, userSpecifiedDescription becomes an empty, but initialized string and passes the null check, hence overwriting the description field value in the Image object.

comment:12 Changed 10 years ago by bpindelski

  • Status changed from new to accepted

comment:13 Changed 10 years ago by bpindelski

Closing. PR 2407 merged.

comment:14 Changed 10 years ago by bpindelski

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

comment:15 Changed 10 years ago by Josh Moore <josh@…>

  • Remaining Time set to 0

(In [286607c816921df834ef4cdfd28028f930d555fe/ome.git] on branch develop) Merge pull request #2427 from bpindelski/rebased/develop/12056-description

Don't use rstring on null values (fix #12056). (rebased onto develop)

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

We're Hiring!