CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

medianTouchPortionMap

Starts from a label map, determines median touch portion to neighbors (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_medianTouchPortionMap(Image labels, Image map_destination);

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);
// Execute operation on GPU
clijx.medianTouchPortionMap(labels, map_destination);
// 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);
% Execute operation on GPU
clijx.medianTouchPortionMap(labels, map_destination);
% 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