GPU accelerated image processing for everyone
Draws a sphere around a given point with given radii in x, y and z (if 3D).
All pixels other than in the sphere are untouched. Consider using set(buffer, 0);
in advance.
Category: Visualisation
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clij2_-2.5.0.1.jar.
Ext.CLIJ2_drawSphere(Image destination, Number x, Number y, Number z, Number radius_x, Number radius_y, Number radius_z, Number value);
// init CLIJ and GPU import net.haesleinhuepf.clij2.CLIJ2; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJ2 clij2 = CLIJ2.getInstance(); // get input parameters destination = clij2.create(); float x = 1.0; float y = 2.0; float z = 3.0; float radius_x = 4.0; float radius_y = 5.0; float radius_z = 6.0; float value = 7.0;
// Execute operation on GPU clij2.drawSphere(destination, x, y, z, radius_x, radius_y, radius_z, value);
// show result destinationImagePlus = clij2.pull(destination); destinationImagePlus.show(); // cleanup memory on GPU clij2.release(destination);
% init CLIJ and GPU clij2 = init_clatlab(); % get input parameters destination = clij2.create(); x = 1.0; y = 2.0; z = 3.0; radius_x = 4.0; radius_y = 5.0; radius_z = 6.0; value = 7.0;
% Execute operation on GPU clij2.drawSphere(destination, x, y, z, radius_x, radius_y, radius_z, value);
% show result destination = clij2.pullMat(destination) % cleanup memory on GPU clij2.release(destination);
// init CLIJ and GPU importClass(net.haesleinhuepf.clicy.CLICY); importClass(Packages.icy.main.Icy); clij2 = CLICY.getInstance(); // get input parameters destination = clij2.create(); x = 1.0; y = 2.0; z = 3.0; radius_x = 4.0; radius_y = 5.0; radius_z = 6.0; value = 7.0;
// Execute operation on GPU clij2.drawSphere(destination, x, y, z, radius_x, radius_y, radius_z, value);
// show result destination_sequence = clij2.pullSequence(destination) Icy.addSequence(destination_sequence); // cleanup memory on GPU clij2.release(destination);
import pyclesperanto_prototype as cle cle.draw_sphere(destination, x, y, z, radius_x, radius_y, radius_z, value)