CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

neighborCountWithTouchPortionAboveThresholdMap

Starts from a label map, determines touch portion to neighbors, counts those above a given value (between 0 and 1) and draws a map.

Categories: Graphs, Labels, Measurements

Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.32.0.1.jar.

Usage in ImageJ macro

Ext.CLIJx_neighborCountWithTouchPortionAboveThresholdMap(Image labels, Image map_destination, Number minimum_touch_portion);

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 labels = clijx.push(labelsImagePlus);
map_destination = clijx.create(labels);
float minimum_touch_portion = 1.0;
// Execute operation on GPU
clijx.neighborCountWithTouchPortionAboveThresholdMap(labels, map_destination, minimum_touch_portion);
// show result
map_destinationImagePlus = clijx.pull(map_destination);
map_destinationImagePlus.show();

// cleanup memory on GPU
clijx.release(labels);
clijx.release(map_destination);
Matlab
% init CLIJ and GPU
clijx = init_clatlabx();

% get input parameters
labels = clijx.pushMat(labels_matrix);
map_destination = clijx.create(labels);
minimum_touch_portion = 1.0;
% Execute operation on GPU
clijx.neighborCountWithTouchPortionAboveThresholdMap(labels, map_destination, minimum_touch_portion);
% show result
map_destination = clijx.pullMat(map_destination)

% cleanup memory on GPU
clijx.release(labels);
clijx.release(map_destination);

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint