<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Nevermind I found the problem. <br><br>I misunderstood how to use RawPixelsStorePrx.<br><br>Each time I wanted to get or set a plane, I was,<br><br>-creating the RawPixelsStorePrx via the ServiceFactory createRawPixelsStore() method.<br>-getting or setting the plane.<br>-closing the RawPixelsStorePrx.<br><br>Now I just do this create/close once per session, ie: at the start and end, and the problem is gone.<br><br>J.<br><br><hr id="stopSpelling">From: jeromeavondo@msn.com<br>To: ome-devel@lists.openmicroscopy.org.uk<br>Date: Mon, 6 Jul 2009 14:43:09 +0000<br>Subject: Re: [ome-devel] Using the GatewayPrx object to copy an Image...<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
<br>Right, <br>got the copy image working by doing as suggested by Micheal,<br><br><div>>The info you need to gather is...</div>
<div>>imageName, channelList, pixelsType, physSizeX, physSizeY, physSizeZ, sizeX, sizeY, sizeZ, sizeT, timeStamp, >dimensionOrder, statsInfo(for GlobalMin/Max), sha1.</div>
<div> >Then you need to create the channel object, logical channel object, populate the logical channels with your emission >wavelengths, attach the logical channels to the channel object, the channel object to the pixels, the pixels to the image, >then saveAndReturn the newImage.</div>
<div><br>A bit long handed, but seems to work as I end up with an unattached image full of black of the same dimensions as the source image. <br><br>Now I am trying to populate the plane data.<br>So I use the getPlane() on my source Image, and the setPlane() on my destination Image.<br><br>However this seems to run out of memory after a while, the crash I get is:<br><br> reason = "OutOfMemoryError occurred while allocating a ByteBuffer"<br> at IceInternal.Buffer.reserve(Buffer.java:163)<br> at IceInternal.Buffer.resize(Buffer.java:72)<br> at IceInternal.Buffer.expand(Buffer.java:59)<br> at IceInternal.BasicStream.expand(BasicStream.java:2031)<br> at IceInternal.BasicStream.writeInt(BasicStream.java:872)<br> at omero.api._RawPixelsStoreDelM.setPlane(_RawPixelsStoreDelM.java:1128)<br> at omero.api.RawPixelsStorePrxHelper.setPlane(RawPixelsStorePrxHelper.java:1546)<br> at omero.api.RawPixelsStorePrxHelper.setPlane(RawPixelsStorePrxHelper.java:1518)<br> at omeroconnect.Main.setPlane(Main.java:906)<br> at omeroconnect.Main.main(Main.java:110)<br>Caused by: java.lang.OutOfMemoryError: Java heap space<br><br>Anyone had this happen to them? Any help would be appreciated. Can post code if needed.<br>Thanks,<br><br>j.<br></div><br><hr>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><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>