[ome-devel] OMERO API - Loading an Image
jburel
j.burel at dundee.ac.uk
Wed Dec 14 10:29:24 GMT 2011
Dear Vanni
We are currently talking to various groups (Hackathon Dresden
happening this week) to make that code more accessible and re-usable
so you won't have to maintain your own version of the gateway, like
this we hope that we will not have x number of the same code around.
We will describe the plans on our website soon and let people know
what's happening.
In the meantime
You could add the following method to the gateway class you are using
to retrieve the Plane Info for a given plane, or collections of plane
List<IObject> loadPlaneInfo(long pixelsID, int z, int t, int channel)
throws Exception
{
isSessionAlive();
IQueryPrx service = entryEncrypted.getQueryService()
StringBuilder sb;
ParametersI param;
sb = new StringBuilder();
param = new ParametersI();
sb.append("select info from PlaneInfo as info ");
sb.append("where pixels.id = :id");
param.addLong("id", pixelsID);
if (z >= 0) {
sb.append(" and info.theZ = :z");
param.map.put("z", omero.rtypes.rint(z));
}
if (t >= 0) {
sb.append(" and info.theT = :t");
param.map.put("t", omero.rtypes.rint(t));
}
if (channel >= 0) {
sb.append(" and info.theC = :c");
param.map.put("c", omero.rtypes.rint(channel));
}
try {
return service.findAllByQuery(sb.toString(), param);
} catch (Exception e) {
throw new Exception("Cannot load the plane info for pixels:
"+pixelsID, e);
}
return new ArrayList<IObject>();
}
The timeIncrement attribute is in the model but we usually do not
populate it.
Do not hesitate to contact me if you need more information
Regards
Jmarie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20111214/51884bd6/attachment.html>
More information about the ome-devel
mailing list