CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

adjacencyMatrixToTouchMatrix

Converts a adjacency matrix in a touch matrix

Categories: Transformations, Graphs

Usage in ImageJ macro

Ext.CLIJ2_adjacencyMatrixToTouchMatrix(Image adjacency_matrix, Image touch_matrix);

Usage in object oriented programming languages

Java
// init CLIJ and GPU
import net.haesleinhuepf.clij2.CLIJ2;
import net.haesleinhuepf.clij.clearcl.ClearCLBuffer;
CLIJ2 clij2 = CLIJ2.getInstance();

// get input parameters
ClearCLBuffer adjacency_matrix = clij2.push(adjacency_matrixImagePlus);
ClearCLBuffer touch_matrix = clij2.push(touch_matrixImagePlus);
// Execute operation on GPU
clij2.adjacencyMatrixToTouchMatrix(adjacency_matrix, touch_matrix);
// show result

// cleanup memory on GPU
clij2.release(adjacency_matrix);
clij2.release(touch_matrix);
Matlab
% init CLIJ and GPU
clij2 = init_clatlab();

% get input parameters
adjacency_matrix = clij2.pushMat(adjacency_matrix_matrix);
touch_matrix = clij2.pushMat(touch_matrix_matrix);
% Execute operation on GPU
clij2.adjacencyMatrixToTouchMatrix(adjacency_matrix, touch_matrix);
% show result

% cleanup memory on GPU
clij2.release(adjacency_matrix);
clij2.release(touch_matrix);
Icy JavaScript
// init CLIJ and GPU
importClass(net.haesleinhuepf.clicy.CLICY);
importClass(Packages.icy.main.Icy);

clij2 = CLICY.getInstance();

// get input parameters
adjacency_matrix_sequence = getSequence();
adjacency_matrix = clij2.pushSequence(adjacency_matrix_sequence);
touch_matrix_sequence = getSequence();
touch_matrix = clij2.pushSequence(touch_matrix_sequence);
// Execute operation on GPU
clij2.adjacencyMatrixToTouchMatrix(adjacency_matrix, touch_matrix);
// show result

// cleanup memory on GPU
clij2.release(adjacency_matrix);
clij2.release(touch_matrix);

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint