Page 1 of 1

creating SPWs

PostPosted: Thu Oct 25, 2012 3:48 pm
by yuriy_alexandrov
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)

Re: creating SPWs

PostPosted: Thu Oct 25, 2012 9:02 pm
by wmoore
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.

Re: creating SPWs

PostPosted: Fri Oct 26, 2012 1:34 pm
by yuriy_alexandrov
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.

Re: creating SPWs

PostPosted: Mon Oct 29, 2012 10:05 am
by wmoore
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) )