[ome-devel] omero & imagej

Curtis Rueden ctrueden at wisc.edu
Mon Apr 27 23:49:07 BST 2015


Hi Alex,

> I'm trying to create an ImageStack object from raw image data
> retrieved from an OMERO server via the java API.

Did you try enabling the OMERO-5.0 update site, and using the File > Import
> OMERO... plugin? It gives you back an ImagePlus of any OMERO image of
your choosing.

Documentation and code at:
* https://github.com/imagej/imagej-omero

And see also:
* https://github.com/scifio/scifio-omero

If you need to do this in a script, here is a quick and dirty one:

// @DatasetIOService dio
// @String host
// @int port
// @String user
// @String password
// @int(label="Image ID") imageID
// @OUTPUT net.imagej.Dataset image
 uri = "omero:server=" + host +
"&port=" + port +
"&user=" + user +
"&password=" + password +
"&imageID=" + imageID
 config = new io.scif.config.SCIFIOConfig()
config.imgOpenerSetImgModes(io.scif.config.SCIFIOConfig.ImgMode.CELL)
 image = dio.open(uri, config)

A couple of notes:

1) The type of the "image" that comes back is a Dataset, which is the
primary ImageJ2 data structure. It is implicitly converted to an
ij.ImagePlus (the primary ImageJ1 data structure) and displayed, by the
module execution framework. Happy to answer any questions about this if you
need clarification.

2) The plaintext password password is temporary; there is work planned to
eliminate that need.

In short: this sort of thing is precisely what the ImageJ-OMERO project (
https://github.com/imagej/imagej-omero) intends to accomplish in a general
way. Please take a look and let us know what you think.

Regards,
Curtis

On Fri, Apr 17, 2015 at 1:06 PM, Alex Rigano <alex.rigano at umassmed.edu>
wrote:

> Hi there,
>
> I'm trying to create an ImageStack object from raw image data retrieved
> from an OMERO server via the java API.
> My current strategy is to get each frame of the image as a byte array and
> transform it in a int array.
> Then create a FloatProcessor for each frame and add it to the ImageStack.
>
> The problem I'm experiencing is that if I execute the same analysis
> procedure in imageJ and in my application I obtain different results.
> So I'm trying to understand if the approach I use to create ImageStack is
> correct.
>
> I realized that you probably already did that for the OMERO.insight plugin
> for ImageJ.
> Would it be possible for you to let me know what is the strategy you used?
>
> Thanks
> Have a great day
>
> --
> Alessandro Rigano
> Application and Database Developer II
> Program in Molecular Medicine
> University of Massachusetts Medical School
> 373 Plantation Street, Biotech II, Suite 114
> Worcester, MA, 01605
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20150427/8b3008d9/attachment.html>


More information about the ome-devel mailing list