<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi,<br><br>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...<br><br>However I think there is something I have misunderstood... I'm currently stuck at the make a duplicate of the image...<br>My code goes as follows,<br><br>client omeroclient;<br>ServiceFactoryPrx sf;<br>GatewayPrx gw;<br><br>//create our omero session<br>omeroclient = new client(servername, 4063);<br>sf = omeroclient.createSession(username, password); <br>sf.closeOnDestroy();<br><br>//create our omero gateway<br>gw = sf.createGateway();<br><br>//get our Image at ID:1<br>Image img = gw.getImage(1);<br><br>//get the Pixels(0) details for this image<br>Pixels pix = img.getPixels(0);<br>int x = pix.getSizeX().getValue();<br>int y = pix.getSizeY().getValue();<br>int z = pix.getSizeZ().getValue();<br>int c = pix.getSizeC().getValue();<br>int t = pix.getSizeT().getValue();<br>List<Integer> channels = new ArrayList();<br>for(int i=0; i<c; i++) channels.add(i);<br><br>//copy this image and get the new image id<br>long newImageID = gw.copyImage(img.getId().getValue(), x, y, t, z, channels, "NewImageProcessed");<br><br>However the gw.copyImage() method generates a crash, which I have attached as an attachment. Is there something I am missing here? Or misunderstood?<br><br>thanks for your help.<br><br>J.<br><br /><hr />Beyond Hotmail - see what else you can do with Windows Live. <a href='http://clk.atdmt.com/UKM/go/134665375/direct/01/' target='_new'>Find out more.</a></body>
</html>