Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



7 Commits

Repository files navigation

CLIJ2 plugin template

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 to inspect the API of a basic CLIJ plugin. Furthermore, you find example OpenCL code in ClearCLs dialect in

In order to deploy your plugin to your Fiji installation, enter the correct path of your Fiji to the pom file:


Afterwards, run

mvn install

Restart Fiji and check using this macro if your plugin was installed successfully:

run("CLIJ2 Macro Extensions", "cl_device=");

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 forum by tagging @haesleinhuepf, leave a github issue or drop a mail to

Happy coding!

Cheers, Robert