We're Hiring!

Open images in 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.

Open images in Matlab

Postby omidghasemi » Fri Apr 24, 2015 1:44 pm

Hi all,

I'm trying to open .afi and .svs images in matlab using omero server. What I'm getting from "getImages" is a handler like "omero.model.ImageI@608a6df2". Is there a way to open the images using these handler?

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

Re: Open images in Matlab

Postby sbesson » Fri Apr 24, 2015 2:08 pm

Hi Omid,

the `getImages` method retrieve the Image object in the OME semantics, i.e. containing both the pixel data and the metadata. Assuming you want to accessing the pixel data of the images, you want to use the methods described in http://www.openmicroscopy.org/site/supp ... ata-access.

For instance, the following code will retrieve the first XY plane of an image specified by its ID:

Code: Select all
i = getImages(s, imageId);  # Returns the image object
plane = getPlane(s, i, 0, 0, 0);  # Returns the first plane of the image


See also https://github.com/sbesson/openmicrosco ... taAccess.m for more examples.


Best regards
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Open images in Matlab

Postby omidghasemi » Tue May 12, 2015 5:15 pm

Thanks a lot!

Omid



sbesson wrote:Hi Omid,

the `getImages` method retrieve the Image object in the OME semantics, i.e. containing both the pixel data and the metadata. Assuming you want to accessing the pixel data of the images, you want to use the methods described in http://www.openmicroscopy.org/site/supp ... ata-access.

For instance, the following code will retrieve the first XY plane of an image specified by its ID:

Code: Select all
i = getImages(s, imageId);  # Returns the image object
plane = getPlane(s, i, 0, 0, 0);  # Returns the first plane of the image


See also https://github.com/sbesson/openmicrosco ... taAccess.m for more examples.


Best regards
Sebastien
omidghasemi
 
Posts: 5
Joined: Thu Apr 09, 2015 3:33 pm

Re: Open images in Matlab

Postby sbesson » Mon May 18, 2015 12:05 pm

You are welcome,

please do not hesitate to let us know if you think either the examples or the documentation are unclear and should either be modified or amended.

Best,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest