Page 1 of 1

line break in OME-TIFF image description tag

PostPosted: Wed Oct 31, 2012 9:00 pm
by dballvt
We have image metadata currently stored in ASCII files (.txt), and I'd like to simply add this metadata to the Image Description field of a generated OME-TIFF. I'm doing this in MATLAB, by adding a call to metadata.setImageDescription in the bfsave function. I'm able to add the text to the image description, but it displays as a single line, making it difficult to read. I've tried adding characters that I could find to indicate a line break(\n, 
, 
) but these all just get displayed as the same characters in the description. Is there any way to add a line break in this tag?

Re: line break in OME-TIFF image description tag

PostPosted: Thu Nov 01, 2012 9:34 am
by cxallan
When you say "these all just get displayed as the same characters in the description" how are you displaying and checking this?

Re: line break in OME-TIFF image description tag

PostPosted: Thu Nov 01, 2012 1:16 pm
by dballvt
They are displayed like that in OMERO.insight in the Image's details window. I've also been checking them using the BioFormats importer plugin in ImageJ with the view OME metadata box checked.

Re: line break in OME-TIFF image description tag

PostPosted: Fri Nov 02, 2012 7:51 pm
by mlinkert
The way to set a multi-line description in Matlab is:

Code: Select all
metadata.setImageDescription(sprintf('first line\nsecondline'), 0);


However, there is currently a bug in Bio-Formats that causes the newlines to be replaced with spaces when the XML is written to an OME-TIFF. A proposed fix is here:

https://github.com/melissalinkert/biofo ... 329ed4cee6

...and the upcoming 4.4.5 release should contain the fix.