CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

labelVoronoiOctagon

Takes a labeled image and dilates the labels using a octagon shape until they touch.

The pixels where the regions touched are afterwards returned as binary image which corresponds to the Voronoi diagram.

Categories: Filter, Labels

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

labelVoronoiOctagon often follows after

labelVoronoiOctagon is often followed by

Usage in ImageJ macro

Ext.CLIJ2_labelVoronoiOctagon(Image label_map, Image label_voronoi_destination);

Usage in object oriented programming languages

Java
// init CLIJ and GPU
import net.haesleinhuepf.clij2.CLIJ2;
import net.haesleinhuepf.clij.clearcl.ClearCLBuffer;
CLIJ2 clij2 = CLIJ2.getInstance();

// get input parameters
ClearCLBuffer label_map = clij2.push(label_mapImagePlus);
label_voronoi_destination = clij2.create(label_map);
// Execute operation on GPU
clij2.labelVoronoiOctagon(label_map, label_voronoi_destination);
// show result
label_voronoi_destinationImagePlus = clij2.pull(label_voronoi_destination);
label_voronoi_destinationImagePlus.show();

// cleanup memory on GPU
clij2.release(label_map);
clij2.release(label_voronoi_destination);
Matlab
% init CLIJ and GPU
clij2 = init_clatlab();

% get input parameters
label_map = clij2.pushMat(label_map_matrix);
label_voronoi_destination = clij2.create(label_map);
% Execute operation on GPU
clij2.labelVoronoiOctagon(label_map, label_voronoi_destination);
% show result
label_voronoi_destination = clij2.pullMat(label_voronoi_destination)

% cleanup memory on GPU
clij2.release(label_map);
clij2.release(label_voronoi_destination);
Icy JavaScript
// init CLIJ and GPU
importClass(net.haesleinhuepf.clicy.CLICY);
importClass(Packages.icy.main.Icy);

clij2 = CLICY.getInstance();

// get input parameters
label_map_sequence = getSequence();
label_map = clij2.pushSequence(label_map_sequence);
label_voronoi_destination = clij2.create(label_map);
// Execute operation on GPU
clij2.labelVoronoiOctagon(label_map, label_voronoi_destination);
// show result
label_voronoi_destination_sequence = clij2.pullSequence(label_voronoi_destination)
Icy.addSequence(label_voronoi_destination_sequence);
// cleanup memory on GPU
clij2.release(label_map);
clij2.release(label_voronoi_destination);

Example notebooks

filtering_in_graphs
neighbors_of_neighbors
spots_pointlists_matrices_tables

Example scripts

filtering_in_graphs.ijm
large_matrices.ijm
neighbors_of_neighbors.ijm
spots_pointlists_matrices_tables.ijm

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint