<div dir="ltr">Hi Will,<div><br></div><div>Sorry for the delay in reply; I have been busy with the ImageJ OPS hackathon in Konstanz this past week. (<a href="https://github.com/imagej/imagej-ops">https://github.com/imagej/imagej-ops</a> if you're interested)</div>
<div><br></div><div>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.</div><div><br></div><div><div>> Could you give us an outline of the functionality that you're working</div>
<div>> on - what the stack looks like etc so I can pass this on to them.</div><div><br></div><div>On a technical level, the dependency stack is briefly summarized here:</div><div><a href="https://github.com/imagej/imagej-omero#set-up-imagej2">https://github.com/imagej/imagej-omero#set-up-imagej2</a><br>
</div><div><br></div><div>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/.</div>
<div><br></div><div>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).</div>
<div><br></div><div>> - E.g. what will be the requirements of a headless analysis plugin,</div><div><br></div><div>The two major rules of thumb are:</div><div><br></div><div>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 all together.</div>
<div><br></div><div>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:</div>
<div>- All primitive types and primitive wrappers</div><div>- Big numbers</div><div>- Dates</div><div>- Colors</div><div>- Files</div><div>- Images</div><div><br></div><div>With support to come later for:</div><div>- Results tables (<a href="https://github.com/imagej/imagej-omero/issues/1">https://github.com/imagej/imagej-omero/issues/1</a>)</div>
<div>- ROIs (<a href="https://github.com/imagej/imagej-omero/issues/2">https://github.com/imagej/imagej-omero/issues/2</a>)</div><div><br></div><div>There will also be lots of usability enhancements to do later (e.g., <a href="https://github.com/imagej/imagej-omero/issues/4">https://github.com/imagej/imagej-omero/issues/4</a>) but those are less urgent.</div>
<div><br></div><div>> how parameters are presented to OMERO scripts</div><div><br></div><div>OMERO treats each ImageJ module parameter as a script parameter. The mapping is 1-to-1.</div><div><br></div><div>> how ImageJ connects to OMERO</div>
<div><br></div><div>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 jython.</div><div><br></div><div>> what API/gateway does it use etc.</div>
</div><div><br></div><div>Metadata parsing:</div><div><a href="https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROFormat.java#L358">https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROFormat.java#L358</a></div>
<div><br></div><div>Reading pixels:</div><div><a href="https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROFormat.java#L403">https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROFormat.java#L403</a><br>
</div><div><br></div><div>Writing pixels:</div><div><a href="https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROFormat.java#L447">https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROFormat.java#L447</a><br>
</div><div><br></div><div>OMERO session management and utility methods:</div><div><a href="https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROSession.java#L51">https://github.com/scifio/scifio-omero/blob/scifio-omero-0.2.1/src/main/java/io/scif/omero/OMEROSession.java#L51</a><br>
</div><div><br></div><div><div>> Can we extend server script analysis functionality by adding</div><div>> recognised jar files to the server install. These jars would provide</div><div>> server side analysis as per OMERO scripts.</div>
</div><div><br></div><div>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.</div>
<div><br></div><div>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 <a href="https://github.com/imagej/imagej-omero/issues/5">https://github.com/imagej/imagej-omero/issues/5</a>).</div>
<div><br></div><div><div>> Gus and I are visiting Alex Herbert at Sussex Uni and he's interested</div><div>> to hear about ImageJ & OMERO.</div></div><div><br></div><div>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.</div>
<div><br></div><div>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 from OMERO.</div>
<div><br></div><div>Regards,</div><div>Curtis</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 8:13 AM, Will Moore <span dir="ltr"><<a href="mailto:will@lifesci.dundee.ac.uk" target="_blank">will@lifesci.dundee.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Curtis,<div><br></div>
<div>Next Monday Gus and I are visiting Alex Herbert at Sussex Uni and he's interested to hear about ImageJ & OMERO.</div><div><br></div><div>His e-mail:</div><div><br></div><div><div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">
<b>Image Analysis:</b><br>
<br>
We use custom ImageJ routines for some analysis. I would like to
know how the integration with ImageJ2 is progressing. ...</div></blockquote><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000">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.<br></div></blockquote></div><br></div><div>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.</div>
<div><br></div><div> - 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.</div><div><br></div>
<div>
I think I'll be doing a presentation of some sort, so would like to add a slide or two on ImageJ.</div><div><br></div><div><br></div><div>Many thanks!</div><div><br></div><div>Cheers,</div><div><br></div><div> Will.</div>
<div><br></div></div>
</blockquote></div><br></div></div>