The c++ library ‘clij2fft’ implements several FFT based algorithms built on top of clFFT. This library is indepentent of java.
Visual Studio Community 2019 c++ compiler
Git for Windows with Bash Terminal
clij2-fft/lib/win64/
directory.clij2-fft/lib/linux64/
directory.You will need to install clFFT
from here using homebrew.
To build on macosx or mac m1/m2 (arm64) perform the following
The macosx the native library libclij2fft needs to be modified with install_name_tool
in order for it to be found by libclij2fft.dylib in it’s current directory (ie when both are in /mambaforge/envs/current_environment/lib)
install_name_tool -change libclFFT.2.dylib @rpath/libclFFT.2.dylib ../../../lib/macosx-arm64/libclij2fft.dylib
If targeting both macosx and macosx-arm64 we need to build a universal binary using ‘lipo’
lipo -create -output lib/macosx-universal2/libclFFT.dylib lib/macosx/libclFFT.dylib lib/macosx-arm64/libclFFT.dylib`
We recommend searching the ImageSC Forum for more information. Please ask questions on the forum if previous discussions are unclear.
A 64 bit c++ compiler is needed to create the wrapper. In windows from Start menu run ‘x64 Native Tools Command Prompt for VS 2019’. In Linux/MacOsx make sure a 64 bit c++ compiler (ie gcc) is installed.
Run ‘mvn install -Dgpg.skip’ from the command line or GUI. NOTE: -Dgpg.skip is needed to skip signing if building for testing or local installation.
The maven build is set up to build native wrappers using javacpp and pack the wrapper into the jar.
If you do not have a c compiler installed you may want to just build the java part of the plugin.