glad to hear you’re doing a deep dive into clij. I’m here to support you.
clij and clij2 are primarily build as Fiji plugins. Thus, I’d recommend installing it to a Fiji and then shipping the Fiji installation to an offline computer. Alternatively, you can pack your clij dependent project together with clij and all its dependencies in an uber-jar and ship it to offline computers. I did this trick in the clicy and clatlab projects. It’s basically just an entry in their pom.xml files.
There is a template-plugin available for clij2, where you can input your code. Reminder: It’s OpenCL, not C
Furthermore, CLIJ brings some convenience functions (actually defines) to make OpenCL easier to use. You find a full list online.
Basically, you can build everything with maven. Just import the pom.xml in your Eclipse as project.
The OpenCL-compilation happens at runtime, because it depends on available OpenCL devices (GPUs) in the target computer. Side note: OpenCL also runs on CPUs, but one may have to install special drivers.
Not sure if this is very easy. The problem is that Java is pretty limited in array length. You can call
imageplus.getProcesser().getPixels() and you will get a 1D array of the pixels of the current 2D plane. This is under the hood also used by CLIJ to push an image to GPU memory. If you want to process an image as Java 1D array slice-by-slice, you can take a look here. I can just discourage you from doing this as it results in array type specific code and likely slower than on the GPU using CLIJ.
The target audience for CLIJ was initially people who don’t want to learn OpenCL. But there is some more detailed documentation targeting people like you who want to dive into this. There is an intro for Java developers and some examples. Furthermore, you might want to read about OpenCL to get started and to get the best performance out of it.
If you have any questions, please let me know. I’d be happy to answer and take them to improve documentation.