GPU accelerated image processing for everyone
Determines bounding box, area (in pixels/voxels), min, max and mean intensity of labelled objects in a label map and corresponding pixels in the original image.
Instead of a label map, you can also use a binary image as a binary image is a label map with just one label.
In CLIJ, this method is executed on the CPU and not on the GPU/OpenCL device.
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_statisticsOfLabelledPixels(Image input, Image labelmap);
// init CLIJ and GPU import net.haesleinhuepf.clij2.CLIJ2; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJ2 clij2 = CLIJ2.getInstance(); // get input parameters ClearCLBuffer input = clij2.push(inputImagePlus); ClearCLBuffer labelmap = clij2.push(labelmapImagePlus);
// Execute operation on GPU double[][] resultStatisticsOfLabelledPixels = clij2.statisticsOfLabelledPixels(input, labelmap);
// show result System.out.println(resultStatisticsOfLabelledPixels); // cleanup memory on GPU clij2.release(input); clij2.release(labelmap);
% init CLIJ and GPU clij2 = init_clatlab(); % get input parameters input = clij2.pushMat(input_matrix); labelmap = clij2.pushMat(labelmap_matrix);
% Execute operation on GPU double[][] resultStatisticsOfLabelledPixels = clij2.statisticsOfLabelledPixels(input, labelmap);
% show result System.out.println(resultStatisticsOfLabelledPixels); % cleanup memory on GPU clij2.release(input); clij2.release(labelmap);
// init CLIJ and GPU importClass(net.haesleinhuepf.clicy.CLICY); importClass(Packages.icy.main.Icy); clij2 = CLICY.getInstance(); // get input parameters input_sequence = getSequence(); input = clij2.pushSequence(input_sequence); labelmap_sequence = getSequence(); labelmap = clij2.pushSequence(labelmap_sequence);
// Execute operation on GPU double[][] resultStatisticsOfLabelledPixels = clij2.statisticsOfLabelledPixels(input, labelmap);
// show result System.out.println(resultStatisticsOfLabelledPixels); // cleanup memory on GPU clij2.release(input); clij2.release(labelmap);
import pyclesperanto_prototype as cle cle.statistics_of_labelled_pixels(input, labelmap)
measure_statistics
outlines_numbers_overlay
spots_pointlists_matrices_tables
bead_segmentation.ipynb
statistics_of_labeled_pixels.ipynb
measure_statistics.ijm
outlines_numbers_overlay.ijm
particle_analysis.ijm
spots_pointlists_matrices_tables.ijm