[ome-devel] Using the GatewayPrx object to copy an Image...
Jerome Avondo
jeromeavondo at msn.com
Fri Jul 3 11:54:06 BST 2009
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.
_________________________________________________________________
Get the best of MSN on your mobile
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/e36c9d9f/attachment.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stacktrace.txt
Url: http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20090703/e36c9d9f/attachment.txt
More information about the ome-devel
mailing list