CLICY

Logo

GPU-accelerated image processing in Icy using CLIJ

View the Project on GitHub clij/clicy

clicy

clicy is a bridge between Icy and clij.

Image

Introduction

It is recommmended to record workflows with the clij2 Recorder by calling Operations from the menu:

Download video

##Scripting For scripting GPU-accelerated workflows in Icy using JavaScript, you should first initalize the GPU:

importClass(net.haesleinhuepf.clicy.CLICY);
importClass(Packages.icy.main.Icy);

// init clicy
clij2 = CLICY.getInstance();
// check which GPU we're using
print(clij2.getGPUName());

Then, you can push sequences to GPU memory and allocate space for more images:

// get current image from Icy
sequence = getSequence();

// push image to GPU
inputBuffer = clij2.pushSequence(sequence);
// allocate memory on GPU for the result
outputBuffer = clij2.create(inputBuffer);

You can process them using the CLIJ2 API:

// process image on GPU
clij2.gaussianBlur(inputBuffer, outputBuffer, 5, 5);

Afterwards, pull the result back and show it in Icy:

// pull result back from GPU
output = clij2.pullSequence(outputBuffer);

// Show result
Icy.addSequence(output);

By the end, always clean up GPU memory:

// free memory of specific images
clij2.release(inputBuffer);

// clean up all images
clij2.clear():

Installation

Download Icy. Enter “clicy” in Icys search field on top and click on install. Voilá.

If you want to have the ClIcy toolbar as well, run the “InstallClicyToolbar” plugin:

Image

Afterwards, a message should appear:

Image

After restarting Icy, you should see the toolbar:

Image

Example code for Icys script editor can be found in the javascript directory. Example Icy protocols can be found in the protocols directory. Also feel free to copy paste from the CLIJ2 documentation, it contains Icy code snippets.

Please note

clicy is under testing right now. Release is planned in June 2020. Please report any issues. Feedback is very welcome! Thanks for your support!

Back to CLIJ documentation

Imprint