We're Hiring!

Leica File - Missing Tag

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Leica File - Missing Tag

Postby flo » Mon Dec 10, 2012 9:26 am

Hi
I'm not sure if this is the right forum or if I should have posted it in the "Bio-Formats" forum (mods please feel free to move this thread).

We are using the OMERO (4.4.5) platform to manage our data. When we upload Leica files (*.lif) all metadata are displayed in the corresponding window, except the <User-Comment> tag. Since we use this tag to describe our experiment it would be great to see this data too. I'm not sure if this is a bio-format or OMERO "problem". Could you please give me a hint how-to / where-to fix it?

Thanks
Flo
flo
 
Posts: 11
Joined: Mon Dec 10, 2012 9:20 am

Re: Leica File - Missing Tag

Postby rleigh » Mon Dec 10, 2012 11:25 am

Hi FLo,

Could you possibly upload an example file containing this metadata so that we can take a closer look at the problem? You can do this here: http://qa.openmicroscopy.org.uk/qa/upload/

Thanks,
Roger Leigh
User avatar
rleigh
 
Posts: 217
Joined: Tue Mar 13, 2012 11:45 am

Re: Leica File - Missing Tag

Postby flo » Wed Dec 12, 2012 10:20 am

Hi Roger,

I'm sorry for the delay in my reply.
I uploaded a test file. The ID is 4791.

Thanks,
Flo
flo
 
Posts: 11
Joined: Mon Dec 10, 2012 9:20 am

Re: Leica File - Missing Tag

Postby rleigh » Wed Dec 12, 2012 10:56 am

Thanks, I've got the image and taken a look at it. It looks like this tag is indeed missing, probably because we're not reading it or storing it. I'll open a ticket for this issue on our bug tracker. Could you possibly let me know what you set the comment to on this image? It will help find it in the data in case it's not obvious.

Thanks,
Roger
User avatar
rleigh
 
Posts: 217
Joined: Tue Mar 13, 2012 11:45 am

Re: Leica File - Missing Tag

Postby flo » Wed Dec 12, 2012 2:46 pm

Thanks Roger!

The text is

test test test
entry entry entry
test test test
flo
 
Posts: 11
Joined: Mon Dec 10, 2012 9:20 am

Re: Leica File - Missing Tag

Postby rleigh » Thu Dec 13, 2012 11:26 am

This is now fixed, pending testing and review here:

https://github.com/openmicroscopy/bioformats/pull/305
User avatar
rleigh
 
Posts: 217
Joined: Tue Mar 13, 2012 11:45 am

Re: Leica File - Missing Tag

Postby flo » Mon Jan 14, 2013 9:02 am

I am sorry for replying late.
Thank you for the quick fix!
flo
 
Posts: 11
Joined: Mon Dec 10, 2012 9:20 am

Re: Leica File - Missing Tag

Postby flo » Tue Feb 05, 2013 8:08 am

Hi,

I don't know if it is a general problem or a Leica <User-Comment> metadata file problem. Since I think it is a Leica file problem I didn't open a new topic.

I upload a Leica file containing a <User-Comment> tag with multiple lines. When I try to export the <User-Comment> tag with an Omero script (.loadOriginalMetadata()) it only exports the first line of the tag, though when I download the metadata file (e.g. Omero.insight) everything is shown.

Could somebody please help me?

Thanks.
flo
 
Posts: 11
Joined: Mon Dec 10, 2012 9:20 am

Re: Leica File - Missing Tag

Postby wmoore » Tue Feb 05, 2013 1:06 pm

Hi,

Assuming the file you've downloaded has

User-Comment[0]=Test test test test
Entry entry entry
Test test test test

you're doing something like this:

Code: Select all
image = conn.getObject("Image", imageId)
om = image.loadOriginalMetadata()
for keyValue in om[2]:
    if len(keyValue) > 1:
        print keyValue[0], keyValue[1]


you're losing the 2nd and 3rd lines because they will be keyValue tuples of one item: len(keyValue) == 1.

You'll need to look for these and append them to the previous comment:

Code: Select all
comments = []
for keyValue in om[2]:
    if len(keyValue) == 2:
        if keyValue[0].startswith("User-Comment"):
            comments.append(keyValue[1])
    else:
        line = "=".join(keyValue)        # in case line contained '='
        if (len(comments) > 0):
            comments[-1] = "%s\n%s" % (comments[-1], line)

for c in comments:
    print c


This should work, but it makes a couple of assumptions that may not be correct:
- None of your additional lines of comments have 1 '=' character in them
- No other Key-Value pairs are multi-line

Hope that helps,

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest