Disruptive ImageJ updates this Friday

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Disruptive ImageJ updates this Friday

ctrueden
Hi everyone,

In the wake of the recent ImgLib2 release [1], the new ImgLib2 components
will be uploaded to the core ImageJ and Fiji update sites this Friday,
December 19.

While we have made a concerted effort to update all core ImageJ and Fiji
components to the new version of ImgLib2, there are still consequences to
this upgrade:

- ImageJ users: **plugins on third party update sites may break** if they
use an outdated version of ImgLib2. If you use a lot of update sites, be
cautious about updating during this transitional period. There is a new
2014-Nov-25 Life-Line version of Fiji available for download [2], in case
you need to roll back.

- Plugin developers: **you should update your plugins** which use ImgLib2
to depend on the latest version [3]. Then after Friday's upload, please
upload your updated versions. If you need any assistance, send a mail to
imagej-devel and/or fiji-devel.

Now that the library is out of beta, the ImgLib2 developers will make every
effort to maintain backward compatibility.

Regards,
Curtis

[1] http://imagej.net/2014-12-10_-_ImgLib2_released

[2] http://fiji.sc/Downloads#Fiji

[3] One easy way to do this is to extend pom-imagej 5.2.1, or pom-fiji
6.1.1 if your plugin is a Fiji component. If in doubt, check your
dependency hierarchy to make sure you are depending on imglib2 2.0.1 or
newer (you can run "mvn dependency:tree" or check the Dependency Hierarchy
in Eclipse). Further reading: http://imagej.net/Architecture

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Differences between .fft.FourierTransform and .fft2.FFT

Michael P Ellis
I am trying to reproduce example

imglib2-tutorials Example6c

https://github.com/imglib/imglib2-tutorials/blob/master/src/main/java/Example6c.java

using the new net.imglib2.algorithm.fft2.FFT rather than the old deprecated net.imglib2.algorithm.fft.FourierTransform

The original example code does:

        // compute fourier transform of the template
        final FourierTransform< FloatType, ComplexFloatType> fft
                = new FourierTransform< FloatType, ComplexFloatType>(
                        template, new ComplexFloatType());
        fft.process();
        Img< ComplexFloatType> templateFFT = fft.getResult();

Which produces an image of size templateFFT minX=0 minY=0 maxX=40 maxY=79

My new code looks like this:

            ImgFactory<ComplexFloatType> fftImgFactory = null;
            try {
                fftImgFactory = template.factory().imgFactory(new ComplexFloatType());
            } catch (IncompatibleTypeException ex) {
                fftImgFactory = null;
            }

            // compute fourier transform of the template
            Img< ComplexFloatType> templateFFT2 = FFT.realToComplex(template, fftImgFactory);

Which produces an image of size templateFFT2 minX=0 minY=0 maxX=36 maxY=71

Also it looks like the image produced by the old FourierTransform and new FFT differ in that the results are shifted in X and Y.

Can anyone help?

In particular I want to achieve the image alignment functionality that is done in Example6c.java without using deprecated code.

Many thanks — Michael Ellis

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: [ImageJ-devel] Differences between .fft.FourierTransform and .fft2.FFT

bnorthan
Hi Micheal

I am not entirely familiar with 'FourierTransform' because I've been using
the newer FFT.java class but I think the differences you are seeing are
because 'FourierTransform' has different preprocessing and extension
related settings.

If you look at FourierTransform.java you can see that the constructor you
used in turn calls another constructor

https://github.com/imglib/imglib2-algorithm-gpl/blob/master/src/main/java/net/imglib2/algorithm/fft/FourierTransform.java

It looks like the 'preprocessing' option defaults to
"relativeExtensionFade' and 'relativeImageExtension' is set to 0.25.

In contrast FFT.java only extends to the nearest 'fast' FFT size and uses a
constant padding strategy.

Keep us up to date on how things are going.  If you manage to get the
tutorial working with the new FFT I think that would be a great addition to
the tutorial.

Brian



On Wed, Dec 17, 2014 at 3:54 AM, Michael Ellis <[hidden email]>
wrote:

>
> I am trying to reproduce example
>
> imglib2-tutorials Example6c
>
>
> https://github.com/imglib/imglib2-tutorials/blob/master/src/main/java/Example6c.java
>
> using the new net.imglib2.algorithm.fft2.FFT rather than the old
> deprecated net.imglib2.algorithm.fft.FourierTransform
>
> The original example code does:
>
>         // compute fourier transform of the template
>         final FourierTransform< FloatType, ComplexFloatType> fft
>                 = new FourierTransform< FloatType, ComplexFloatType>(
>                         template, new ComplexFloatType());
>         fft.process();
>         Img< ComplexFloatType> templateFFT = fft.getResult();
>
> Which produces an image of size templateFFT minX=0 minY=0 maxX=40 maxY=79
>
> My new code looks like this:
>
>             ImgFactory<ComplexFloatType> fftImgFactory = null;
>             try {
>                 fftImgFactory = template.factory().imgFactory(new
> ComplexFloatType());
>             } catch (IncompatibleTypeException ex) {
>                 fftImgFactory = null;
>             }
>
>             // compute fourier transform of the template
>             Img< ComplexFloatType> templateFFT2 =
> FFT.realToComplex(template, fftImgFactory);
>
> Which produces an image of size templateFFT2 minX=0 minY=0 maxX=36 maxY=71
>
> Also it looks like the image produced by the old FourierTransform and new
> FFT differ in that the results are shifted in X and Y.
>
> Can anyone help?
>
> In particular I want to achieve the image alignment functionality that is
> done in Example6c.java without using deprecated code.
>
> Many thanks — Michael Ellis
>
>
>
>
> _______________________________________________
> ImageJ-devel mailing list
> [hidden email]
> http://imagej.net/mailman/listinfo/imagej-devel
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Disruptive ImageJ updates this Friday

ctrueden
In reply to this post by ctrueden
Hi everyone,

> The new ImgLib2 components will be uploaded to the core
> ImageJ and Fiji update sites this Friday, December 19.

The update is complete: the release version of ImgLib2 is now distributed
with ImageJ. All libraries and plugins on the ImageJ and Fiji update sites
have been updated accordingly, and should continue working as before. As
always, please report any issues you encounter.

This update also includes the BigDataViewer libraries and plugin suite on
the core Fiji update site. If you have the BigDataViewer update site
enabled, you should disable it in favor of the BigDataViewer that ships
with Fiji.

Thanks to everyone who helped make this update possible!

Cheers,
Curtis

P.S. If you have any other update sites enabled and they are not working
correctly (especially if you see errors containing "ClassNotFoundException"
or "NoSuchMethodError" with "net.imglib2"), chances are that the author of
those plugins needs to update them to work with the release version of
ImgLib2. Please report such issues via Help > Report a Bug.

On Tue, Dec 16, 2014 at 2:29 PM, Curtis Rueden <[hidden email]> wrote:

>
> Hi everyone,
>
> In the wake of the recent ImgLib2 release [1], the new ImgLib2 components
> will be uploaded to the core ImageJ and Fiji update sites this Friday,
> December 19.
>
> While we have made a concerted effort to update all core ImageJ and Fiji
> components to the new version of ImgLib2, there are still consequences to
> this upgrade:
>
> - ImageJ users: **plugins on third party update sites may break** if they
> use an outdated version of ImgLib2. If you use a lot of update sites, be
> cautious about updating during this transitional period. There is a new
> 2014-Nov-25 Life-Line version of Fiji available for download [2], in case
> you need to roll back.
>
> - Plugin developers: **you should update your plugins** which use ImgLib2
> to depend on the latest version [3]. Then after Friday's upload, please
> upload your updated versions. If you need any assistance, send a mail to
> imagej-devel and/or fiji-devel.
>
> Now that the library is out of beta, the ImgLib2 developers will make
> every effort to maintain backward compatibility.
>
> Regards,
> Curtis
>
> [1] http://imagej.net/2014-12-10_-_ImgLib2_released
>
> [2] http://fiji.sc/Downloads#Fiji
>
> [3] One easy way to do this is to extend pom-imagej 5.2.1, or pom-fiji
> 6.1.1 if your plugin is a Fiji component. If in doubt, check your
> dependency hierarchy to make sure you are depending on imglib2 2.0.1 or
> newer (you can run "mvn dependency:tree" or check the Dependency Hierarchy
> in Eclipse). Further reading: http://imagej.net/Architecture
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html