We're Hiring!

importing OME.tiffs in Omero 5

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please 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

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Thu Apr 24, 2014 2:41 pm

...
I checked again how Omero (talking about 5.0) Insight behaves when

1) importing generated OME-tiff
2) exporting it back form Omero to disk as OME-tiff, by using "Export as OME-tiff" option

As Will said, the uploading to Omero takes seconds (image is about 150M).

If one uses "Export as OME-tiff" on this imported image, the Description field is preserved in the resulting OME-tiff file - as needed.

However, this Description of imported image isn't displayed by Insight in the Description window (on the right).

The problem with new version of Bioformats is still there, - I generate OME-tiffs using old version of "loci_tools". The new one seemingly misses "getOMEXML" function.

Thanks,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Fri Apr 25, 2014 1:03 pm

Correction to the previous report -

If one uses "Export as OME-tiff" on the imported image, the Description of the resulting OME-tiff is not as expected - when creating original OME-tiff, the metadata were populated by "setUUIDFileName", and that was stored in Description as well as in metadata, however the Description of the exported OME-tiff contains some generated names for XY planes, so the original names are lost.

Best,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: importing OME.tiffs in Omero 5

Postby jburel » Fri Apr 25, 2014 1:54 pm

Thanks Yuriy
This is an known issue we are currently working on
see http://trac.openmicroscopy.org.uk/ome/ticket/12056

Do you want to be cc'd on the ticket?

Regards

Jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Fri Apr 25, 2014 2:33 pm

yes certainly,

many thanks,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: importing OME.tiffs in Omero 5

Postby rleigh » Mon Apr 28, 2014 8:55 am

Hi Yuriy,

In 5.0 and later, getOMEXML is provided by the OMEXMLService. Example: components/formats-gpl/test/loci/formats/utests/xml/OMEXMLServiceTest.java and components/formats-bsd/src/loci/formats/out/OMETiffWriter.java.

Note that this was also the case in 4.4. MetadataTools.getOMEXMLService was just a compatibility wrapper, so if you change your code to use OMEXMLService.getOMEXML, it will still be compatible with 4.4.


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

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Mon Apr 28, 2014 4:47 pm

Many thanks Roger - I will check it out and let know soon.

Best wishes,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Tue Apr 29, 2014 10:13 am

Hi again,

I struggle to adjust syntax for getOMEXML call in 5

the working Matlab code was previously

Code: Select all
img_description = char(loci.formats.MetadataTools.getOMEXML(metadata));

I changed it to this -

Code: Select all
img_description = char(loci.formats.services.OMEXMLService.getOMEXML(metadata));

It results in error message
the class loci.formats.services.OMEXMLService has no property or method named getOMEXML

It looks like I'm (hopefully) doing something wrong, - in which case please show how to call it properly..

Best,
Y.
Last edited by yuriy_alexandrov on Wed Apr 30, 2014 1:23 pm, edited 1 time in total.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: importing OME.tiffs in Omero 5

Postby mlinkert » Tue Apr 29, 2014 10:51 pm

getOMEXML is not a static method in loci.formats.services.OMEXMLService; you must construct an instance of OMEXMLService and call the method on that instance. The correct way to do this in Matlab is shown in https://github.com/openmicroscopy/biofo ... ader.m#L82, so the following should do what you need:

Code: Select all
service = loci.formats.services.OMEXMLServiceImpl();
img_description = char(service.getOMEXML(metadata));
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Wed Apr 30, 2014 9:46 am

...
Thanks Melissa - this worked indeed!

Filling ImageDescription looks OK now.

The last question if I may?

We need to put ModuloAlong annotation into OME-tiff metadata - for gated FLIM images definitely, but for other data (raw OPT, etc.) as well.

So naturally, the same question arises about an example code for OME-tiff creation with ModuloAlong.
(If not Matlab, Java code would be helpful certainly.)

Many thanks again,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: importing OME.tiffs in Omero 5

Postby yuriy_alexandrov » Wed Apr 30, 2014 11:06 am

some update on OME-tiff import.

I tried to import by Insight and it fails for OME-tiffs generated with 5.0 service, as well as with previous 4.0 loci_tools.jar library, and also 3rd party (LaVision FLIM) OME-tiffs also fail (that were imported previously without problems).

I wonder if is there any issues with OME-tiff import presently?

it might be something with server, as I'm unable to import neither sdt nor usual tiffs, as well.
I asked a colleague to try to import usual tiff by Insight on another computer - it fails there as well.

Best,
Y.
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

PreviousNext

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest