Pregunta

I tried to google this, looking for code examples but I had no luck.

Anyone knows a place where I can find a tutorial or just examples on how to use Imagej in Java to open and process images?

I was able to get ImageJ in a Jar What I'd like to do is make a simple image difference processor

Thanks for your help and time

¿Fue útil?

Solución

There are two major versions of ImageJ you can program against: the original ImageJ 1.x, and the still-in-beta ImageJ2.

Either way, I strongly suggest structuring your code as a Maven project. By doing this, you avoid manually managing JAR files, and can develop your project in any Maven-enabled IDE (Eclipse, NetBeans, IDEA, etc.) or from the command line.

The ImageJ artifacts (for either v1 or v2) are not yet available on Maven Central, but will be soon. Until then, you'll need to add a <repository> reference to maven.imagej.net. Here is a sample snippet for your pom.xml:

<parent>
  <groupId>org.scijava</groupId>
  <artifactId>pom-scijava</artifactId>
  <version>1.15</version>
</parent>
...
<dependencies>
  <dependency>
    <groupId>net.imagej</groupId>
    <artifactId>ij</artifactId>
    <version>${imagej1.version}</version>
  </dependency>
</dependencies>
...
<!-- NB: for project parent -->
<repositories>
  <repository>
    <id>imagej.releases</id>
    <url>http://maven.imagej.net/content/repositories/releases</url>
  </repository>
</repositories>

Or if you want to depend on ImageJ2:

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

For documentation of ImageJ1, ImageJ2 and related projects including many of their dependencies, see the javadoc at:

For tutorials on how to use ImageJ2, see:

And for more information on programming against ImageJ1, see:

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top