This repository contains a simple CLIJ2 plugin. Clone it to make your own CLIJ2 plugin and run your OpenCL code from ImageJ macro.
Just open pom.xml and enter your name, domain, the name of your plugin etc. Afterwards, navigate to PluginTemplate.java to inspect the API of a basic CLIJ plugin. Furthermore, you find example OpenCL code in ClearCLs dialect in template.cl.
In order to deploy your plugin to your Fiji installation, enter the correct path of your Fiji to the pom file:
<scijava.app.directory>C:/programs/fiji-win64/Fiji.app/</scijava.app.directory>
Afterwards, run
mvn install
Restart Fiji and check using this macro if your plugin was installed successfully:
run("CLIJ2 Macro Extensions", "cl_device=");
Ext.CLIJ2_help("pluginTemplate");
The ImageJ log window should then output something like:
Found 1 method(s) containing the pattern "pluginTemplate":
Ext.CLIJ2_pluginTemplate(Image source, Image destination, Number scalar);
Next steps would be changing Java and OpenCL code to your needs. Let me know how it goes! Contact me on the image.sc forum by tagging @haesleinhuepf, leave a github issue or drop a mail to [email protected]
Happy coding!
Cheers, Robert