GPU accelerated image processing for everyone
Takes a touch matrix and a vector of values to determine the minimum value among touching neighbors for every object.
values : Image A vector of values corresponding to the labels of which the minimum should be determined. touch_matrix : Image A touch_matrix specifying which labels are taken into account for neighborhood relationships. minimum_values_destination : Image A the resulting vector of minimum values in the neighborhood.
Category: Measurements
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_minimumOfTouchingNeighbors(Image values, Image touch_matrix, Image minimum_values_destination);
// init CLIJ and GPU import net.haesleinhuepf.clij2.CLIJ2; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJ2 clij2 = CLIJ2.getInstance(); // get input parameters ClearCLBuffer values = clij2.push(valuesImagePlus); ClearCLBuffer touch_matrix = clij2.push(touch_matrixImagePlus); minimum_values_destination = clij2.create(values);
// Execute operation on GPU clij2.minimumOfTouchingNeighbors(values, touch_matrix, minimum_values_destination);
// show result minimum_values_destinationImagePlus = clij2.pull(minimum_values_destination); minimum_values_destinationImagePlus.show(); // cleanup memory on GPU clij2.release(values); clij2.release(touch_matrix); clij2.release(minimum_values_destination);
% init CLIJ and GPU clij2 = init_clatlab(); % get input parameters values = clij2.pushMat(values_matrix); touch_matrix = clij2.pushMat(touch_matrix_matrix); minimum_values_destination = clij2.create(values);
% Execute operation on GPU clij2.minimumOfTouchingNeighbors(values, touch_matrix, minimum_values_destination);
% show result minimum_values_destination = clij2.pullMat(minimum_values_destination) % cleanup memory on GPU clij2.release(values); clij2.release(touch_matrix); clij2.release(minimum_values_destination);
// init CLIJ and GPU importClass(net.haesleinhuepf.clicy.CLICY); importClass(Packages.icy.main.Icy); clij2 = CLICY.getInstance(); // get input parameters values_sequence = getSequence(); values = clij2.pushSequence(values_sequence); touch_matrix_sequence = getSequence(); touch_matrix = clij2.pushSequence(touch_matrix_sequence); minimum_values_destination = clij2.create(values);
// Execute operation on GPU clij2.minimumOfTouchingNeighbors(values, touch_matrix, minimum_values_destination);
// show result minimum_values_destination_sequence = clij2.pullSequence(minimum_values_destination) Icy.addSequence(minimum_values_destination_sequence); // cleanup memory on GPU clij2.release(values); clij2.release(touch_matrix); clij2.release(minimum_values_destination);
import pyclesperanto_prototype as cle cle.minimum_of_touching_neighbors(values, touch_matrix, minimum_values_destination)
mean_of_touching_neighbors
superpixel_segmentation
tribolium_morphometry
tissue_neighborhood_quantification.ipynb
mean_of_touching_neighbors.ijm
superpixel_segmentation.ijm
tribolium_morphometry.ijm