CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

pointIndexListToTouchMatrix

Takes a list of point indices to generate a touch matrix (a.k.a. adjacency graph matrix) out of it.

The list hasa dimensionality of m*n for the points 1… m (0 a.k.a. background is not in this list). In the n rows, there are indices to points which should be connected.

Parameters

indexlist : Image matrix_destination : Image

Category: Graphs

Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.30.1.21.jar.

Usage in ImageJ macro

Ext.CLIJx_pointIndexListToTouchMatrix(Image indexlist, Image matrix_destination);

Usage in object oriented programming languages

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

// get input parameters
ClearCLBuffer indexlist = clijx.push(indexlistImagePlus);
matrix_destination = clijx.create(indexlist);
// Execute operation on GPU
clijx.pointIndexListToTouchMatrix(indexlist, matrix_destination);
// show result
matrix_destinationImagePlus = clijx.pull(matrix_destination);
matrix_destinationImagePlus.show();

// cleanup memory on GPU
clijx.release(indexlist);
clijx.release(matrix_destination);
Matlab
% init CLIJ and GPU
clijx = init_clatlabx();

% get input parameters
indexlist = clijx.pushMat(indexlist_matrix);
matrix_destination = clijx.create(indexlist);
% Execute operation on GPU
clijx.pointIndexListToTouchMatrix(indexlist, matrix_destination);
% show result
matrix_destination = clijx.pullMat(matrix_destination)

% cleanup memory on GPU
clijx.release(indexlist);
clijx.release(matrix_destination);
clEsperanto Python (experimental)
import pyclesperanto_prototype as cle

cle.point_index_list_to_touch_matrix(indexlist, matrix_destination)

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint