GPU accelerated image processing for everyone
By Pradeep Rajasekhar and Robert Haase
Inspired by Grayscale attribute filtering from MorpholibJ library by David Legland & Ignacio Arganda-Carreras.
This plugin will remove components in a grayscale image based on user-specified area (for 2D: pixels) or volume (3D: voxels). For each gray level specified in the number of bins, binary images will be generated, followed by exclusion of objects (labels) below a minimum pixel count. All the binary images for each gray level are combined to form the final image. The output is a grayscale image, where bright objects below pixel count are removed. It is recommended that low values be used for number of bins, especially for large 3D images, or it may take long time.
Category: Filter
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.32.0.1.jar.
Ext.CLIJx_greyLevelAtttributeFiltering(Image source, Image destination, Number number_of_bins, Number minimum_pixel_count);
// init CLIJ and GPU import net.haesleinhuepf.clijx.CLIJx; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJx clijx = CLIJx.getInstance(); // get input parameters ClearCLBuffer source = clijx.push(sourceImagePlus); destination = clijx.create(source); int number_of_bins = 10; int minimum_pixel_count = 20;
// Execute operation on GPU clijx.greyLevelAtttributeFiltering(source, destination, number_of_bins, minimum_pixel_count);
// show result destinationImagePlus = clijx.pull(destination); destinationImagePlus.show(); // cleanup memory on GPU clijx.release(source); clijx.release(destination);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters source = clijx.pushMat(source_matrix); destination = clijx.create(source); number_of_bins = 10; minimum_pixel_count = 20;
% Execute operation on GPU clijx.greyLevelAtttributeFiltering(source, destination, number_of_bins, minimum_pixel_count);
% show result destination = clijx.pullMat(destination) % cleanup memory on GPU clijx.release(source); clijx.release(destination);