Import imglib or imglib2 fft

imagej

#1

Hello,

In Fiji I am using the following code to employ “PhaseCorrelation” for fast Cross-correlation:

import mpicbg.imglib.image.ImagePlusAdapter;
import mpicbg.imglib.algorithm.fft.PhaseCorrelation;

phc = PhaseCorrelation(ImagePlusAdapter.wrap(imp2), ImagePlusAdapter.wrap(imp1), 5, True)

I was now trying to do the same using ImageJ1 (not Fiji) and IntelliJ as an IDE, using maven to import the dependencies. I was trying below pom.xml but it does not work.
It says it “cannot resolve symbol ImagePlusAdaptor”; neither does it find “fft”.

<repositories>
   <repository>
      <id>imagej.public</id>
      <url>http://maven.imagej.net/content/groups/public</url>
   </repository>

   <repository>
       <id>imagej.releases</id>
       <url>http://maven.imagej.net/content/repositories/releases</url>
   </repository>
</repositories>

<dependency>
   <groupId>mpicbg</groupId>
   <artifactId>imglib</artifactId>
   <version>2.0.0-beta6</version>
</dependency>
  1. I was wondering what I am doing wrong?

  2. I was further wondering if I should rather use an alternative imglib2-based code (instead of imglib) ?


#2

@tpietzsch helped me :slight_smile:

One needs to add more artifacts:

<dependency>
    <groupId>mpicbg</groupId>
    <artifactId>mpicbg</artifactId>
    <version>1.0.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/mpicbg/imglib -->
<dependency>
    <groupId>mpicbg</groupId>
    <artifactId>imglib</artifactId>
    <version>2.0.0-beta6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/mpicbg/imglib-ij -->
<dependency>
    <groupId>mpicbg</groupId>
    <artifactId>imglib-ij</artifactId>
    <version>2.0.0-beta6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/mpicbg/imglib-algorithms -->
<dependency>
    <groupId>mpicbg</groupId>
    <artifactId>imglib-algorithms</artifactId>
    <version>2.0.0-beta6</version>
</dependency>