CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

pointIndexListToMesh

Meshes all points in a given point list which are indiced in a corresponding index list.

Usage in ImageJ macro

Ext.CLIJ2_pointIndexListToMesh(Image pointlist, Image indexList, Image mesh_destination);

Usage in Java

clij2.pointIndexListToMesh(pointlist, indexList, mesh_destination);
// init CLIJ and GPU
import net.haesleinhuepf.clij2.CLIJ2;
import net.haesleinhuepf.clij.clearcl.ClearCLBuffer;
CLIJ2 clij2 = CLIJ2.getInstance();

// get input parameters
ClearCLBuffer pointlist = clij2.push(pointlistImagePlus);
ClearCLBuffer indexList = clij2.push(indexListImagePlus);
mesh_destination = clij2.create(pointlist);
// Execute operation on GPU
clij2.pointIndexListToMesh(pointlist, indexList, mesh_destination);
//show result
mesh_destinationImagePlus = clij2.pull(mesh_destination);
mesh_destinationImagePlus.show();

// cleanup memory on GPU
clij2.release(pointlist);
clij2.release(indexList);
clij2.release(mesh_destination);

Usage in Matlab

clij2.pointIndexListToMesh(pointlist, indexList, mesh_destination);
% init CLIJ and GPU
clij2 = init_clatlab();

% get input parameters
pointlist = clij2.pushMat(pointlist_matrix);
indexList = clij2.pushMat(indexList_matrix);
mesh_destination = clij2.create(pointlist);
% Execute operation on GPU
clij2.pointIndexListToMesh(pointlist, indexList, mesh_destination);
% show result
mesh_destination = clij2.pullMat(mesh_destination)

% cleanup memory on GPU
clij2.release(pointlist);
clij2.release(indexList);
clij2.release(mesh_destination);

Usage in Icy

clij2.pointIndexListToMesh(pointlist, indexList, mesh_destination);
// init CLIJ and GPU
importClass(net.haesleinhuepf.clicy.CLICY);
importClass(Packages.icy.main.Icy);

clij2 = CLICY.getInstance();

// get input parameters
pointlist_sequence = getSequence();
pointlist = clij2.pushSequence(pointlist_sequence);
indexList_sequence = getSequence();
indexList = clij2.pushSequence(indexList_sequence);
mesh_destination = clij2.create(pointlist);
// Execute operation on GPU
clij2.pointIndexListToMesh(pointlist, indexList, mesh_destination);
// show result
mesh_destination_sequence = clij2.pullSequence(mesh_destination)
Icy.addSequence(mesh_destination_sequence);
// cleanup memory on GPU
clij2.release(pointlist);
clij2.release(indexList);
clij2.release(mesh_destination);

Example scripts

mesh_closest_points.py

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint