Page 1 of 1

linking image onto serer using Matlab

PostPosted: Fri Jun 05, 2015 7:36 pm
by omidghasemi
Hi All,

I'm trying to link an image onto OMERO server using matlab function createImage (https://github.com/openmicroscopy/openm ... ateImage.m). The code loads the image on the predefined project and dataset, but it cannot open the image. The error that I get from OMERO client is "cannot start Rendering Engine. Image not ready."

In the previous problem, the matlab code is actually reading the image, loading it to the server and then linking it to the dataset. As I'm trying to automate the ".svs" and ".afi" images and these images have several zoomed images and therefore are huge in size, a follow up question would be: is there a way to link the images without actually loading the image into matlab?

Do you have any suggestion on solving the problem?

Thank you,
Omid

Re: linking image onto serer using Matlab

PostPosted: Sun Jun 07, 2015 1:13 pm
by sbesson
Hi Omid,

first of all, to make sure we are using the same terminology, I assume from your description that "link an image onto OMERO" means creating an image object on the server and then uploading individual planes into this image using the RawPixelsStore from MATLAB.

There can be multiple causes for a "cannot start Rendering Engine" error message. To help you further with this issue, we need to see the code you use to create the image into OMERO. Is it possible for you to push it to either GitHub or any alternate public location?

The alternative strategy is to do an image import into the server. This operation does not require to load the pixel data client-side but also uploads the original file(s) to the server. In order to import images without using the Insight client, you could use the Command Line Interface.

Best,
Sebastien

Re: linking image onto serer using Matlab

PostPosted: Mon Jun 08, 2015 1:04 pm
by omidghasemi
Hi Sebastien,

Thank you for your reply. You are right about linking the image. The fact is that we have a shared drive for the images scanned over the years. We don't want to move the images from their current location to OMERO server, but only to link them with OMERO database (something like in-place import). Attached please find the code that I'm using. It is just a modified version of the one you have on the github. The purpose of the code is to facilitate the data transfer for those scientists who are not using command line.

https://github.com/omidghasemi/Create_I ... 6063a44f6b

Cheers,
Omid

Re: linking image onto serer using Matlab

PostPosted: Wed Jun 10, 2015 2:16 pm
by bramalingam
Hi,

Looks like you would like to use the 'in-place import' feature, within OMERO.

The easiest option would be to use the command line tools (which are part of our regular release cycle),
https://www.openmicroscopy.org/site/support/omero5.1/users/cli/index.html

The advanced import features within OMERO (in-place import, etc) are documented in the following pages,
https://www.openmicroscopy.org/site/support/omero5.1/sysadmins/in-place-import.html#inplace-import

and simple shell scripts should solve your problem.

Alternatively,
If you are specific about using Matlab in your workflow, please take a look at the following gist page:
https://gist.github.com/bramalingam/1d36f827add8f5342068 (upload_image.m script)

This uses the OMERO Java api to implement a few import features discussed in the documentation page mentioned above.
(***Please note that this is just a prototype/example and is not a production ready script.***)

Requirements :
1) OMERO Matlab Toolbox,
http://downloads.openmicroscopy.org/omero/5.1.2/
--The toolbox comes with a libs folder , which carries the OMERO dependencies. Please add the following jars to it as well,
- bioformats_package.jar (http://downloads.openmicroscopy.org/bio-formats/5.1.2/)
- ini4j.jar (https://github.com/openmicroscopy/openmicroscopy/blob/develop/lib/repository/ini4j-0.3.2.jar)

(You will have to add these jars to your Matlab Classpath).

2) You will have to overwrite the (static) matlab google-collect.jar (packaged with matlab) with the guava.jar from the toolbox.
Please look into the following page for more details on the same,
http://stackoverflow.com/questions/1636 ... aclasspath

The above script is just an example, and we are streamlining the documentation for such examples. So any comments/feedback on this regard would be very valuable at our end.

Hope that helps,
Best,
Balaji

Re: linking image onto serer using Matlab

PostPosted: Fri Jun 12, 2015 6:46 pm
by omidghasemi
Thanks a lot Balaji, I will try it and let you know the results.

Cheers,
Omid