Converts a adjacency matrix in a touch matrix.
An adjacency matrix is symmetric while a touch matrix is typically not.
adjacency_matrix : Image The input adjacency matrix to be read from. touch_matrix : Image The output touch matrix to be written into.
Categories: Transformations, Graphs
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clij2_-2.5.0.1.jar.
Ext.CLIJ2_adjacencyMatrixToTouchMatrix(Image adjacency_matrix, Image touch_matrix);
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);