We're Hiring!

linking image onto serer using Matlab

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.

linking image onto serer using Matlab

Postby omidghasemi » Fri Jun 05, 2015 7:36 pm

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
omidghasemi
 
Posts: 5
Joined: Thu Apr 09, 2015 3:33 pm

Re: linking image onto serer using Matlab

Postby sbesson » Sun Jun 07, 2015 1:13 pm

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
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: linking image onto serer using Matlab

Postby omidghasemi » Mon Jun 08, 2015 1:04 pm

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
omidghasemi
 
Posts: 5
Joined: Thu Apr 09, 2015 3:33 pm

Re: linking image onto serer using Matlab

Postby bramalingam » Wed Jun 10, 2015 2:16 pm

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
User avatar
bramalingam
 
Posts: 70
Joined: Tue Jan 14, 2014 12:01 pm

Re: linking image onto serer using Matlab

Postby omidghasemi » Fri Jun 12, 2015 6:46 pm

Thanks a lot Balaji, I will try it and let you know the results.

Cheers,
Omid
omidghasemi
 
Posts: 5
Joined: Thu Apr 09, 2015 3:33 pm


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest