We're Hiring!

line break in OME-TIFF image description tag

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

line break in OME-TIFF image description tag

Postby dballvt » Wed Oct 31, 2012 9:00 pm

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?
dballvt
 
Posts: 24
Joined: Wed Jul 14, 2010 1:45 pm

Re: line break in OME-TIFF image description tag

Postby cxallan » Thu Nov 01, 2012 9:34 am

When you say "these all just get displayed as the same characters in the description" how are you displaying and checking this?
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: line break in OME-TIFF image description tag

Postby dballvt » Thu Nov 01, 2012 1:16 pm

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.
dballvt
 
Posts: 24
Joined: Wed Jul 14, 2010 1:45 pm

Re: line break in OME-TIFF image description tag

Postby mlinkert » Fri Nov 02, 2012 7:51 pm

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.
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest