We're Hiring!

creating SPWs

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.

creating SPWs

Postby yuriy_alexandrov » Thu Oct 25, 2012 3:48 pm

Dear All,

My question is related to SPW format.

We work on interfacing our FLIM software with Omero.
Coding is in Matlab.

We would like to use SPW layout to store and access plate readers data.
However, the SPW example that is put the net, looks utdated.

Our data are stored on disk, so one needs to create and populate Plate according to description (one can imply that OME-XML for plate is available). Omero images should be created on the fly; that we know how to do.

Minimal example we would like to have, is to create Plate, place there a Well, in the Well a WellSample, and there a newly created Image or several. More extended example might be when working with list of acquired images.

Once imported to Omero, these SPW should be certainly downloadable; for this, I think there are more examples.
Main stumbling point is to create properly linked SPW structure from newly created Images.

Thanks, best regards,
Y.
(Yuriy Alexandrov)
yuriy_alexandrov
 
Posts: 126
Joined: Thu Oct 25, 2012 2:06 pm

Re: creating SPWs

Postby wmoore » Thu Oct 25, 2012 9:02 pm

Hi,

Have a look at the Dataset_To_Plate.py script https://github.com/ome/scripts/blob/mas ... o_Plate.py

This basically takes a sequence of images and saves them into an SPW format.

It's in Python, but I think that most of the code you're interested in uses the basic OMERO API, so it'll look very similar in Java / Matlab. See addImageToPlate() method in particular.

Hope that helps,

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

Re: creating SPWs

Postby yuriy_alexandrov » Fri Oct 26, 2012 1:34 pm

Thanks very much for Your response Will,

I have difficulty translating the function "addImageToPlate".
I am not sure how to access these fields from Matlab:

well.plate = omero.model.PlateI(plateId, False)
well.column = rint(column)
well.row = rint(row)
......
ws.image = omero.model.ImageI(image.id, False)
ws.well = well


I get the following error:

ret = addImageToPlate(conn, image, plateId, col, row, false);
No public field plate exists for class omero.model.WellI.

Error in Dataset_to_Plate/addImageToPlate (line 397)
well.plate = omero.model.PlateI(plateId, false);


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

Re: creating SPWs

Postby wmoore » Mon Oct 29, 2012 10:05 am

Sorry, this is just a Python shorthand.

Code: Select all
well.plate = omero.model.PlateI(plateId, False)


can be written like this:

Code: Select all
well.setPlate( omero.model.PlateI(plateId, False) )
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest