GPU accelerated image processing for everyone
Apply MorpholibJ Morphological Segmentation to an object image to produce a label image.
The tolerance parameter specifies how deep intensity valley between local maxima can be to be ignored while flooding the regions. With connectivity = 6 and using dams=false while computing the watershed.See also https://imagej.net/Morphological_Segmentation
Category: Labels
Availability: Available in Fiji by activating the update sites clij, clij2 and clijx-assistant-extensions. This function is part of clijx-assistant-morpholibj_-0.6.0.1.jar.
Ext.CLIJx_morphoLibJMorphologicalSegmentationLabelBorderImage(Image input, Image labels_destination, Number tolerance_threshold);
// init CLIJ and GPU import net.haesleinhuepf.clijx.CLIJx; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJx clijx = CLIJx.getInstance(); // get input parameters ClearCLBuffer input = clijx.push(inputImagePlus); labels_destination = clijx.create(input); float tolerance_threshold = 1.0;
// Execute operation on GPU clijx.morphoLibJMorphologicalSegmentationLabelBorderImage(input, labels_destination, tolerance_threshold);
// show result labels_destinationImagePlus = clijx.pull(labels_destination); labels_destinationImagePlus.show(); // cleanup memory on GPU clijx.release(input); clijx.release(labels_destination);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters input = clijx.pushMat(input_matrix); labels_destination = clijx.create(input); tolerance_threshold = 1.0;
% Execute operation on GPU clijx.morphoLibJMorphologicalSegmentationLabelBorderImage(input, labels_destination, tolerance_threshold);
% show result labels_destination = clijx.pullMat(labels_destination) % cleanup memory on GPU clijx.release(input); clijx.release(labels_destination);