GPU accelerated image processing for everyone
Run particle image velocimetry on a 2D+t timelapse.
Availability: Available in Fiji by activating the update sites clij and clij2. This function is part of clijx_-0.32.0.1.jar.
Ext.CLIJx_particleImageVelocimetryTimelapse(Image source, Image destinationDeltaX, Image destinationDeltaY, Image destinationDeltaZ, Number maxDeltaX, Number maxDeltaY, Number maxDeltaZ, Boolean correctLocalShift);
// init CLIJ and GPU import net.haesleinhuepf.clijx.CLIJx; import net.haesleinhuepf.clij.clearcl.ClearCLBuffer; CLIJx clijx = CLIJx.getInstance(); // get input parameters ClearCLBuffer source = clijx.push(sourceImagePlus); destinationDeltaX = clijx.create(source); destinationDeltaY = clijx.create(source); destinationDeltaZ = clijx.create(source); int maxDeltaX = 10; int maxDeltaY = 20; int maxDeltaZ = 30; boolean correctLocalShift = true;
// Execute operation on GPU clijx.particleImageVelocimetryTimelapse(source, destinationDeltaX, destinationDeltaY, destinationDeltaZ, maxDeltaX, maxDeltaY, maxDeltaZ, correctLocalShift);
// show result destinationDeltaXImagePlus = clijx.pull(destinationDeltaX); destinationDeltaXImagePlus.show(); destinationDeltaYImagePlus = clijx.pull(destinationDeltaY); destinationDeltaYImagePlus.show(); destinationDeltaZImagePlus = clijx.pull(destinationDeltaZ); destinationDeltaZImagePlus.show(); // cleanup memory on GPU clijx.release(source); clijx.release(destinationDeltaX); clijx.release(destinationDeltaY); clijx.release(destinationDeltaZ);
% init CLIJ and GPU clijx = init_clatlabx(); % get input parameters source = clijx.pushMat(source_matrix); destinationDeltaX = clijx.create(source); destinationDeltaY = clijx.create(source); destinationDeltaZ = clijx.create(source); maxDeltaX = 10; maxDeltaY = 20; maxDeltaZ = 30; correctLocalShift = true;
% Execute operation on GPU clijx.particleImageVelocimetryTimelapse(source, destinationDeltaX, destinationDeltaY, destinationDeltaZ, maxDeltaX, maxDeltaY, maxDeltaZ, correctLocalShift);
% show result destinationDeltaX = clijx.pullMat(destinationDeltaX) destinationDeltaY = clijx.pullMat(destinationDeltaY) destinationDeltaZ = clijx.pullMat(destinationDeltaZ) % cleanup memory on GPU clijx.release(source); clijx.release(destinationDeltaX); clijx.release(destinationDeltaY); clijx.release(destinationDeltaZ);