[ome-devel] Using the GatewayPrx object to copy an Image...
Jerome Avondo
jeromeavondo at msn.com
Mon Jul 6 16:04:14 BST 2009
Nevermind I found the problem.
I misunderstood how to use RawPixelsStorePrx.
Each time I wanted to get or set a plane, I was,
-creating the RawPixelsStorePrx via the ServiceFactory createRawPixelsStore() method.
-getting or setting the plane.
-closing the RawPixelsStorePrx.
Now I just do this create/close once per session, ie: at the start and end, and the problem is gone.
J.
From: jeromeavondo at msn.com
To: ome-devel at lists.openmicroscopy.org.uk
Date: Mon, 6 Jul 2009 14:43:09 +0000
Subject: Re: [ome-devel] Using the GatewayPrx object to copy an Image...
Right,
got the copy image working by doing as suggested by Micheal,
>The info you need to gather is...
>imageName, channelList, pixelsType, physSizeX, physSizeY, physSizeZ, sizeX, sizeY, sizeZ, sizeT, timeStamp, >dimensionOrder, statsInfo(for GlobalMin/Max), sha1.
>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.
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.
Now I am trying to populate the plane data.
So I use the getPlane() on my source Image, and the setPlane() on my destination Image.
However this seems to run out of memory after a while, the crash I get is:
reason = "OutOfMemoryError occurred while allocating a ByteBuffer"
at IceInternal.Buffer.reserve(Buffer.java:163)
at IceInternal.Buffer.resize(Buffer.java:72)
at IceInternal.Buffer.expand(Buffer.java:59)
at IceInternal.BasicStream.expand(BasicStream.java:2031)
at IceInternal.BasicStream.writeInt(BasicStream.java:872)
at omero.api._RawPixelsStoreDelM.setPlane(_RawPixelsStoreDelM.java:1128)
at omero.api.RawPixelsStorePrxHelper.setPlane(RawPixelsStorePrxHelper.java:1546)
at omero.api.RawPixelsStorePrxHelper.setPlane(RawPixelsStorePrxHelper.java:1518)
at omeroconnect.Main.setPlane(Main.java:906)
at omeroconnect.Main.main(Main.java:110)
Caused by: java.lang.OutOfMemoryError: Java heap space
Anyone had this happen to them? Any help would be appreciated. Can post code if needed.
Thanks,
j.
Beyond Hotmail - see what else you can do with Windows Live. Find out more.
_________________________________________________________________
With Windows Live, you can organise, edit, and share your photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20090706/9565d401/attachment.htm
More information about the ome-devel
mailing list