[ImageJ-devel] ImageJ2 Headless Question

Curtis Rueden ctrueden at wisc.edu
Tue Oct 22 09:07:26 CDT 2013


Hi Joe,

Very sorry for the delay in reply.

> I'm using the complete snapshot all jar and maybe this is the cause?

Definitely; the "all" JAR was busted. I was able to reproduce this issue,
and pushed a fix to master last night.

The latest build of imagej-2.0.0-SNAPSHOT-all.jar should start up properly
now, although there is another outstanding bug on master when quitting
ImageJ (https://github.com/scijava/scijava-common/pull/14).

That said, I will second Johannes's suggestion to set up a Maven project
with a dependency on ImageJ Maven artifact(s). The easiest is to extend the
latest version of pom-scijava as parent, and add this dependency:

  <dependency>
    <groupId>net.imagej</groupId>
    <artifactId>ij-app</artifactId>
    <version>${imagej.version}</version>
  </dependency>

That will pull in all the ImageJ2 code transitively for you to use. If you
are a stickler you can add individual direct dependencies to the components
you are using, but it is not necessary.

> I've looked at the tutorials for ImageJ2 and I've tried the dataset
example

So, the ImageJ tutorials are already set up to work this way. Just use File
> Import > Existing Maven Projects and point it at your imagej-tutorials
checkout. You'll get all the projects in Eclipse, managed by M2E, with no
extra work needed. You definitely should *not* need to use the uber-JAR,
nor ever explicitly manage your classpath in Eclipse. Just edit the Maven
POM then refresh the project in Eclipse and it will update the "Maven
dependencies" accordingly.

Regards,
Curtis


On Sun, Sep 22, 2013 at 12:30 AM, Joe Falconer <
joseph.falconer at lincolnuni.ac.nz> wrote:

> Hi,
>
> Hope I'm posting to the correct location.
>
> I'm trying to do something that appears quite simple using ImageJ2 - read
> in a pgm file in headless mode and iterate over and analyse the pixel data
> in the image.
>
> I've looked at the tutorials for ImageJ2 and I've tried the dataset
> example but I'm having some issues. I'm having Maven connector issues in
> Eclipse Kepler so I'm using the complete snapshot all jar and maybe this is
> the cause? This is my trace when running the dataset example :
>
> WARN: Ignoring non-Maven build directory: C:\Documents and
> Settings\Joe\ImagingWorkspace\IJ2Test\bin
> Exception in thread "main" java.lang.IllegalArgumentException: Invalid
> service: imagej.console.DefaultConsoleService
>
> I've also tried the ImgLib2 examples on the fiji site referred to from the
> tutorials page but I've had trouble getting them to run without raising "No
> compatible service: io.scif.SCIFIOService" exception.
>
> I'm guessing I have some build/dependency issues - any suggestions?
>
> thanks for any help
>
> Joe
>
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20131022/a7d6b69c/attachment-0001.html>


More information about the ImageJ-devel mailing list