CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

generateLabelFeatureImage

Generates a feature image for Trainable Weka Segmentation.

Use this terminology to specify which features should be generated:

Example: “MEAN_INTENSITY count_touching_neighbors”

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

Usage in ImageJ macro

Ext.CLIJx_generateLabelFeatureImage(Image input, Image label_map, Image label_feature_image_destination, String feature_definitions);

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);
ClearCLBuffer label_map = clijx.push(label_mapImagePlus);
label_feature_image_destination = clijx.create(input);
// Execute operation on GPU
clijx.generateLabelFeatureImage(input, label_map, label_feature_image_destination, feature_definitions);
// show result
label_feature_image_destinationImagePlus = clijx.pull(label_feature_image_destination);
label_feature_image_destinationImagePlus.show();

// cleanup memory on GPU
clijx.release(input);
clijx.release(label_map);
clijx.release(label_feature_image_destination);
Matlab
% init CLIJ and GPU
clijx = init_clatlabx();

% get input parameters
input = clijx.pushMat(input_matrix);
label_map = clijx.pushMat(label_map_matrix);
label_feature_image_destination = clijx.create(input);
% Execute operation on GPU
clijx.generateLabelFeatureImage(input, label_map, label_feature_image_destination, feature_definitions);
% show result
label_feature_image_destination = clijx.pullMat(label_feature_image_destination)

% cleanup memory on GPU
clijx.release(input);
clijx.release(label_map);
clijx.release(label_feature_image_destination);

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint