GPU accelerated image processing for everyone
By Peter Haub
Computes the color deconvolution of an 8bit RGB stack color image with a given 3x3 matrix of color vectors. Note: The input image has to be a stack with three z-slices corresponding to the red, green and blue channel.)
Additional information see Supplementary Information to:
Haub, P., Meckel, T. A Model based Survey of Colour Deconvolution in Diagnostic Brightfield Microscopy: Error Estimation and Spectral Consideration. Sci Rep 5, 12096 (2015). https://doi.org/10.1038/srep12096
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_colorDeconvolution(Image source, Image color_vectors, Image destination);
// 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); ClearCLBuffer color_vectors = clijx.push(color_vectorsImagePlus); destination = clijx.create(source);
// Execute operation on GPU clijx.colorDeconvolution(source, color_vectors, destination);
// show result destinationImagePlus = clijx.pull(destination); destinationImagePlus.show(); // cleanup memory on GPU clijx.release(source); clijx.release(color_vectors); clijx.release(destination);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters source = clijx.pushMat(source_matrix); color_vectors = clijx.pushMat(color_vectors_matrix); destination = clijx.create(source);
% Execute operation on GPU clijx.colorDeconvolution(source, color_vectors, destination);
% show result destination = clijx.pullMat(destination) % cleanup memory on GPU clijx.release(source); clijx.release(color_vectors); clijx.release(destination);