[ImageJ-devel] ImageJ scripts in OMERO
ctrueden at wisc.edu
Sun Mar 9 06:42:55 CDT 2014
Sorry for the delay in reply; I have been busy with the ImageJ OPS
hackathon in Konstanz this past week.
(https://github.com/imagej/imagej-opsif you're interested)
I am CCing the ome-devel and imagej-devel lists in case other developers in
the community are interested in details of the ImageJ/OMERO integration.
> Could you give us an outline of the functionality that you're working
> on - what the stack looks like etc so I can pass this on to them.
On a technical level, the dependency stack is briefly summarized here:
You need OMERO 5, Jython available on your path, and ImageJ2 installed into
omero/lib/ImageJ.app, along with the scifio-omero and ij-omero libraries in
the ImageJ.app/jars folder. You can install whatever other plugins you want
into jars/ and plugins/, and any ImageJ scripts you want into scripts/.
There are some loose ends I must finish for ImageJ parameterized scripts to
fully work in OMERO, but I will complete that work as soon I return from
the EU (or maybe even do it while I am visiting Josh later this week).
> - E.g. what will be the requirements of a headless analysis plugin,
The two major rules of thumb are:
1) For it to work headless, do not use java.awt or javax.swing. Technically
you can use certain things, but why? Better to just avoid those packages
2) For it to be usable, it must declare its inputs and outputs as
parameters (rather than doing something dirty like harvesting them from a
UI, config file, etc.). That way, the integration layer will map them to
OMERO script parameters and they will be fully integrated with OMERO.
Supported parameter types currently are:
- All primitive types and primitive wrappers
- Big numbers
With support to come later for:
- Results tables (https://github.com/imagej/imagej-omero/issues/1)
- ROIs (https://github.com/imagej/imagej-omero/issues/2)
There will also be lots of usability enhancements to do later (e.g.,
https://github.com/imagej/imagej-omero/issues/4) but those are less urgent.
> how parameters are presented to OMERO scripts
OMERO treats each ImageJ module parameter as a script parameter. The
mapping is 1-to-1.
> how ImageJ connects to OMERO
It connects via Ice, of course, using the omero-client library. ImageJ runs
in an separate JVM from OMERO, which is spun up by the system call to
> what API/gateway does it use etc.
OMERO session management and utility methods:
> Can we extend server script analysis functionality by adding
> recognised jar files to the server install. These jars would provide
> server side analysis as per OMERO scripts.
Yes, that is exactly the idea, and it works very well. ImageJ2 uses the
SciJava Common plugin mechanism for extensibility and discovery, so
extensions on the classpath work with zero configuration. And new ImageJ
scripts in the ImageJ.app/scripts subtree are automatically discovered, too.
The only wrinkle there is that the OMERO script wrappers (in
omero/lib/scripts/imagej) must be regenerated by running "genScripts.py"
afterwards. But we can automate that (see
> Gus and I are visiting Alex Herbert at Sussex Uni and he's interested
> to hear about ImageJ & OMERO.
Yeah, it would be great to get Alex's work unified with the ImageJ2
integration. It is probably a couple of months early for that, though.
However, I am excited that we now have a solid plan to get ImageJ 2.0.0
released within the next few months. In particular, we are on the cusp of
supporting "mixed world" commands in ImageJ, so that the IJ1 interface can
execute IJ2-style parameterized commands and scripts on ImageJ1 data
structures. Combined with our IJ1 patching to enable headless support, it
will become feasible to expose many IJ1 plugins within OMERO by porting
them to the IJ2 parameterized approach, but without needing to port the
data structures being used.
When that is further along I will provide more documentation so that A)
users can seriously start using ImageJ from within OMERO; and B) developers
can better understand the requirements for ImageJ commands to work headless
On Mon, Mar 3, 2014 at 8:13 AM, Will Moore <will at lifesci.dundee.ac.uk>wrote:
> Hi Curtis,
> Next Monday Gus and I are visiting Alex Herbert at Sussex Uni and he's
> interested to hear about ImageJ & OMERO.
> His e-mail:
> *Image Analysis:*
> We use custom ImageJ routines for some analysis. I would like to know how
> the integration with ImageJ2 is progressing. ...
> Can we extend server script analysis functionality by adding recognised
> jar files to the server install. These jars would provide server side
> analysis as per OMERO scripts.
> Could you give us an outline of the functionality that you're working on -
> what the stack looks like etc so I can pass this on to them.
> - E.g. what will be the requirements of a headless analysis plugin, how
> parameters are presented to OMERO scripts, how ImageJ connects to OMERO,
> what API/gateway does it use etc.
> I think I'll be doing a presentation of some sort, so would like to add a
> slide or two on ImageJ.
> Many thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ImageJ-devel