[ome-users] Getting Raw Pixels from OME-XML file

Josiah Johnston siah at nih.gov
Tue Aug 15 21:39:18 BST 2006


The image server has C code to do this. You can use the image server  
or write a wrapper around the C code.
To use the image server, you wouldn't need to log into the data  
server. You would need to upload the file to the image server, then  
call ImportOMEfile on it. ImportOMEfile will return the xml with the  
pixel data parsed out and stored on the image server. If you parse  
the returned XML, you can obtain the OMEIS pixel ids. Call GetPixels  
with those ids, and you'll have the raw pixels.
You can use a normal omeis for this (i.e. what comes out of standard  
ome installations), or you could have an omeis running independently  
from an ome data server. If you had a standalone omeis, you could  
delete the xml file and pixels after you extracted the relevant pixels.

Documentation on relevant parts of the image server can be found on  
the main ome website.

OME/src/C/omeis/xmlBinaryResolution.c implements pixel extraction. It  
is dependent on base64.c, b64z_lib.c, zlib, bzip2, and associated  
header files. To make it stand independently of the rest of the image  
server, you would have to implement your own functions of NewPixels,  
setPixelPlane, increment_plane_indexes, and FinishPixels.

-Josiah

On Aug 15, 2006, at 4:06 PM, Nicholas Lahens wrote:

> Hi everyone,
> I've been working on some java classes which interface with
> the OME-JAVA package, making it a bit easier to work with.
> I'm currently working on a method which extracts metadata
> from an OME-XML file. It uses the OMENode and ImageNode
> classes to extract an image's basic dimensions. However, I
> run into trouble when I try to get the raw pixel data (ie the
> byte array). Is there an easy built-in way to get this? The
> pixel factory relies upon a login and session key, but I
> would like to be able to extract the pixels directly from the
> file without loggin into the server. Do I need to convert the
> node into an Element and then extract the pixel data directly
> from the attribute? Thanks for any help.
>
> Nick
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users



More information about the ome-users mailing list