GPU accelerated image processing for everyone
Takes a label map and reduces all labels to their edges. Label IDs stay the same and background will be zero.
Category: Labels
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.30.1.21.jar.
Ext.CLIJx_reduceLabelsToLabelEdges(Image input_labels, Image destination_labels);
// init CLIJ and GPU import net.haesleinhuepf.clijx.CLIJx; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJx clijx = CLIJx.getInstance(); // get input parameters ClearCLBuffer input_labels = clijx.push(input_labelsImagePlus); destination_labels = clijx.create(input_labels);
// Execute operation on GPU clijx.reduceLabelsToLabelEdges(input_labels, destination_labels);
// show result destination_labelsImagePlus = clijx.pull(destination_labels); destination_labelsImagePlus.show(); // cleanup memory on GPU clijx.release(input_labels); clijx.release(destination_labels);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters input_labels = clijx.pushMat(input_labels_matrix); destination_labels = clijx.create(input_labels);
% Execute operation on GPU clijx.reduceLabelsToLabelEdges(input_labels, destination_labels);
% show result destination_labels = clijx.pullMat(destination_labels) % cleanup memory on GPU clijx.release(input_labels); clijx.release(destination_labels);