Dear friends of #clij and #GPU accelerated image processing,
I’m happy to announce that CLIJ2 BETA testing is open to the public. This is a call for testers! If we manage to break clij2 now, it will be more stable after release mid June. Thanks to everyone taking part in advance!
Compared to CLIJ, CLIJ2 offers 224 new operations, some improve older methods, some offer new functionalty, others are convenience methods making your life with pixels on GPUs easier
Vectors, matrices, pointlists, meshes and corresponding operations
Non-square shaped pixels, a.k.a. cells
Furthermore, CLIJ2 offers operations for filtering images with non-square shaped pixels managed using the new graph-based processing operations.
CLIJ2 operations use the by-reference concept which is well known in ImageJ macro for images and other parameters. Undefined variables can be passed over and will hold values after the operation finished. This allows simplifying code.
// CLIJ Ext.CLIJ_centerOfMass(binary); mx = getResult("MassX", nResults() - 1); my = getResult("MassY", nResults() - 1); // -------------------------- // CLIJ2 Ext.CLIJ2_getCenterOfMass(binary, mx, my, _);
CLIJ2 offers various methods for easier workflow debugging such has handling arrays and strings
// push array as 2x3 image array = newArray(1, 2, 3, 4, 5, 6); Ext.CLIJ2_pushArray(input, array, 2, 3, 1); // do something with it Ext.CLIJ2_multiplyImageAndScalar(input, result, 3); // print output image Ext.CLIJ2_print(result);
To find out which operations take how much time, you can collect time traces:
Ext.CLIJ2_startTimeTracing(); Ext.CLIJ2_multiplyImageAndScalar(input, result, 3); Ext.CLIJ2_stopTimeTracing(); // print out how long operations took Ext.CLIJ2_getTimeTracing(time_traces); print(time_traces);
Memory management for Java/Jython/Groovy/JavasSript developers
Developers can name images and buffers and list memory consumption
CLIJ2 clij2 = CLIJ2.getInstance(); ClearCLBuffer data = clij2.create(100, 100); data.setName("My data"); System.out.println(clij2.reportMemory());
GPU contains 1 images. - My data 39.0 kB [My data ClearCLBuffer [mClearCLContext=ClearCLContext [device=ClearCLDevice [mClearCLPlatform=ClearCLPlatform [name=NVIDIA CUDA], name=GeForce RTX 2060 SUPER]], mNativeType=Float, mNumberOfChannels=1, mDimensions=[100, 100], getMemAllocMode()=Best, getHostAccessType()=ReadWrite, getKernelAccessType()=ReadWrite, getBackend()=net.haesleinhuepf.clij.clearcl.backend.jocl.ClearCLBackendJOCL@63e2203c, getPeerPointer()=net.haesleinhuepf.clij.clearcl.ClearCLPeerPointer@1efed156]] 39.0 kB = 39.0 kB
Also the method
clij2.clear(); is new compared to CLIJ, it releases all images/buffers in GPU memory.
The new CLIJ2 website offers extensive documentation, including operations which typically follow other operations.
New cheat sheets
The cheat sheets have been updated to list new CLIJ2 operations.
CLIJ2 is scheduled to release mid June 2020 - in 4 weeks. With that day CLIJ will deprecate and receive maintenance and support for at least another year. CLIJ users might start having a look at the CLIJ-CLIJ2 transition guide.
If anyone finds a bug or has a question, feel free to drop it here or open a new thread.
Thanks everyone for your support!