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

Usage in ImageJ macro

Ext.CLIJ2_set(Image source, Number value);

Usage in Java

clij2.set(source, value);
// 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);

Usage in Matlab

clij2.set(source, value);
% 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);

Usage in Icy

clij2.set(source, value);
// 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);

Example notebooks

crop_and_paste
filtering_in_graphs
matrix_multiply
neighbors_of_neighbors
tribolium_morphometry

Example scripts

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
jaccardIndex.py
mesh_closest_points.py
multiply_images_test.py

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint