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

Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clij2_-2.5.0.1.jar.

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

benchmarking
crop_and_paste
filtering_in_graphs
matrix_multiply
neighbors_of_neighbors
tribolium_morphometry
crop_and_paste_images.ipynb
tribolium_morphometry.ipynb
affine_transforms.ipynb
benchmarking.ipynb
benchmarking_centroids_of_labels.ipynb
connected_component_labeling.ipynb
convolution.ipynb
extend_labels.ipynb
gaussian_blur.ipynb
intensity_projections.ipynb
matrix_multiplication.ipynb
pixelwise_comparison.ipynb
statistics_of_labeled_pixels.ipynb
threshold_otsu.ipynb
transpose.ipynb

Example scripts

benchmarking.ijm
centroid_visualisation.ijm
check_if_positions_are_in_roi.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
tubeness.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