Skip to content

clij/clicy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

<iframe src="images/clicy_recorder.mp4" width="540" height="310"></iframe> [Download video](images/clicy_recorder.mp4)

##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.

Back to CLIJ documentation

Imprint