<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi Micheal,<br><br>Thanks for getting back to me.<br><br>


<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}</style>&gt;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 &gt;be fairly readable.
<div>&nbsp;<br>Yeah that would be very helpful, thanks!<br><br>J.<br></div><br>&gt;&gt;&gt; Jerome Avondo &lt;jeromeavondo@msn.com&gt; 03/07/2009 11:54 &gt;&gt;&gt;<br><div>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);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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&lt;Integer&gt; channels = new ArrayList();<br>for(int i=0; i&lt;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></div>
<div>
<hr>
</div>
<div>Beyond Hotmail - see what else you can do with Windows Live. <a href="http://clk.atdmt.com/UKM/go/134665375/direct/01/">Find out more.</a> </div><br>

    
      The University of Dundee is a registered Scottish charity, No: SC015096
    <BR><br /><hr />View your Twitter and Flickr updates from one place - <a href='http://clk.atdmt.com/UKM/go/137984870/direct/01/' target='_new'>Learn more!</a></body>
</html>