CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

morphoLibJMorphologicalSegmentationLabelBorderImage

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.4.2.22.jar.

Usage in ImageJ macro

Ext.CLIJx_morphoLibJMorphologicalSegmentationLabelBorderImage(Image input, Image labels_destination, Number tolerance_threshold);

Usage in object oriented programming languages

Java
// 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);
Matlab
% 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);

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint