[ome-devel] Using the GatewayPrx object to copy an Image...
Jerome Avondo
jeromeavondo at msn.com
Fri Jul 3 13:38:33 BST 2009
Hi Micheal,
Thanks for getting back to me.
>If you want to do it this way I can send you my work-around if you like? I'm using the gateway with matlab, but it should >be fairly readable.
Yeah that would be very helpful, thanks!
J.
>>> Jerome Avondo <jeromeavondo at msn.com> 03/07/2009 11:54 >>>
Hi,
I am trying to do the following, get an Image from the server, make a duplicate of it, and then do some image processing to this duplicate...
However I think there is something I have misunderstood... I'm currently stuck at the make a duplicate of the image...
My code goes as follows,
client omeroclient;
ServiceFactoryPrx sf;
GatewayPrx gw;
//create our omero session
omeroclient = new client(servername, 4063);
sf = omeroclient.createSession(username, password);
sf.closeOnDestroy();
//create our omero gateway
gw = sf.createGateway();
//get our Image at ID:1
Image img = gw.getImage(1);
//get the Pixels(0) details for this image
Pixels pix = img.getPixels(0);
int x = pix.getSizeX().getValue();
int y = pix.getSizeY().getValue();
int z = pix.getSizeZ().getValue();
int c = pix.getSizeC().getValue();
int t = pix.getSizeT().getValue();
List<Integer> channels = new ArrayList();
for(int i=0; i<c; i++) channels.add(i);
//copy this image and get the new image id
long newImageID = gw.copyImage(img.getId().getValue(), x, y, t, z, channels, "NewImageProcessed");
However the gw.copyImage() method generates a crash, which I have attached as an attachment. Is there something I am missing here? Or misunderstood?
thanks for your help.
J.
Beyond Hotmail - see what else you can do with Windows Live. Find out more.
The University of Dundee is a registered Scottish charity, No: SC015096
_________________________________________________________________
MSN straight to your mobile - news, entertainment, videos and more.
http://clk.atdmt.com/UKM/go/147991039/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20090703/335cbe3f/attachment.htm
More information about the ome-devel
mailing list