GPU accelerated image processing for everyone
Checks if all elements of a matrix are different by less than or equal to a given tolerance.
The result will be put in the results table in column “MatrixEqual” as 1 if yes and 0 otherwise.
Category: Math
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_matrixEqual(Image input1, Image input2, Number tolerance);
// init CLIJ and GPU import net.haesleinhuepf.clij2.CLIJ2; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJ2 clij2 = CLIJ2.getInstance(); // get input parameters ClearCLBuffer input1 = clij2.push(input1ImagePlus); ClearCLBuffer input2 = clij2.push(input2ImagePlus); float tolerance = 1.0;
// Execute operation on GPU clij2.matrixEqual(input1, input2, tolerance);
// show result // cleanup memory on GPU clij2.release(input1); clij2.release(input2);
% init CLIJ and GPU clij2 = init_clatlab(); % get input parameters input1 = clij2.pushMat(input1_matrix); input2 = clij2.pushMat(input2_matrix); tolerance = 1.0;
% Execute operation on GPU clij2.matrixEqual(input1, input2, tolerance);
% show result % cleanup memory on GPU clij2.release(input1); clij2.release(input2);
// init CLIJ and GPU importClass(net.haesleinhuepf.clicy.CLICY); importClass(Packages.icy.main.Icy); clij2 = CLICY.getInstance(); // get input parameters input1_sequence = getSequence(); input1 = clij2.pushSequence(input1_sequence); input2_sequence = getSequence(); input2 = clij2.pushSequence(input2_sequence); tolerance = 1.0;
// Execute operation on GPU clij2.matrixEqual(input1, input2, tolerance);
// show result // cleanup memory on GPU clij2.release(input1); clij2.release(input2);