CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

set

Sets all pixel values x of a given image X to a constant value v.

f(x) = v

Category: Math

Usage in ImageJ macro

Ext.CLIJ2_set(Image source, Number value);

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 source = clij2.push(sourceImagePlus);
float value = 1.0;
// Execute operation on GPU
clij2.set(source, value);
// show result

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

% get input parameters
source = clij2.pushMat(source_matrix);
value = 1.0;
% Execute operation on GPU
clij2.set(source, value);
% show result

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

clij2 = CLICY.getInstance();

// get input parameters
source_sequence = getSequence();
source = clij2.pushSequence(source_sequence);
value = 1.0;
// Execute operation on GPU
clij2.set(source, value);
// show result

// cleanup memory on GPU
clij2.release(source);
clEsperanto Python (experimental)
import pyclesperanto_prototype as cle

cle.set(source, value)

Example notebooks

crop_and_paste
filtering_in_graphs
matrix_multiply
neighbors_of_neighbors
tribolium_morphometry

Example scripts

centroid_visualisation.ijm
crop_and_paste.ijm
drawLine.ijm
filtering_in_graphs.ijm
grid.ijm
intensity_per_label.ijm
large_matrices.ijm
matrix_multiply.ijm
meshTouchingNeighbors.ijm
mesh_closest_points.ijm
neighbors_of_neighbors.ijm
rotating_sphere.ijm
tribolium_morphometry.ijm
mesh_close_points.m
interactiveCylinderProjection.py
interactiveSphereProjection.py
jaccardIndex.py
mesh_closest_points.py
multiply_images_test.py

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint