clij2-fft

clij2-fft: Fast OpenCL GPU FFT based image processing algorithms for Java, Python and C++

Build Status Build Status Maven Scijava Version

The clij2-fft project provides fast, easy-to-use 2D/3D FFT and FFT-based algorithms that work from Java, Python, and C++, so the same code can power plugins (e.g., convolution, deconvolution) across platforms.

There are many GPU deconvolution projects in Python, which are probably easier to use for Python programmers. clij2-fft is available in Python but is also designed so the same code can be called from Java (or from C++). Thus, the build process is a bit more complex than for Python-only implementations.

Currently, most of the focus has been on an implementation of Richardson-Lucy Deconvolution that includes non-circulant edge handling and total variation regularization. We found this particularly useful in deconvolving images from instruments with extended PSFs, for which the classic version of Richardson-Lucy sometimes produces ringing at high iteration numbers. See an example here.

Latest features and updates are tracked in the Release Log, though this code is still in very early development. If you are experimenting with this codebase, please feel free to submit an issue or ping us on the Imaging Forum.

The clij2-fft project is built upon clFFT.

Fiji Update Site

If you are looking to work with Clij2-fft deconvolution in Fiji, please follow these instructions.

Python

The Python version is now available on PyPI.

If you are a Python programmer, take a look at the python sub-directory for the experimental Python distribution. See these installation instructions, and also this Python example may be helpful. In addition, if you are deconvolving large images, this Dask example may be useful.

Please note that thus far, only a small subset of potential algorithms have been implemented. For example, we have implemented 3D deconvolution but not 2D, and 2D FFT but not 3D. If you are in need of a particular FFT flavor or FFT-based algorithm, please ask questions on the forum. We can prioritize future work based on that feedback and also help others implement additional algorithms.

Java and ImageJ

clij2-fft requires clij2 and clij update sites. Follow these instructions to install clij2. You will also need to add the clijx-deconvolution update site.

You can then access Richardson-Lucy Deconvolution via the CLIJ2-assistant, as shown in this video.

To build the code, follow these instructions.

Currently, clij2-fft is a work in progress. The best way to learn how to use clij2-fft is to study the examples and then follow up with questions on the Image.sc Forum.

If you are a Java programmer, the clij2-fft test here may be helpful.

If you are a script programmer, these scripting examples may be helpful.