CLIJ2

Logo

GPU accelerated image processing for everyone

CLIJ2 home

rigidTransform

Applies a rigid transform using linear interpolation to an image stack.

Category: Transformations

Usage in ImageJ macro

Ext.CLIJx_rigidTransform(Image input, Image destination, Number translation_x, Number translation_y, Number translation_z, Number rotation_angle_x, Number rotation_angle_y, Number rotation_angle_z);

Usage in object oriented programming languages

Java
// init CLIJ and GPU
import net.haesleinhuepf.clijx.CLIJx;
import net.haesleinhuepf.clij.clearcl.ClearCLBuffer;
CLIJx clijx = CLIJx.getInstance();

// get input parameters
ClearCLBuffer input = clijx.push(inputImagePlus);
destination = clijx.create(input);
float translation_x = 1.0;
float translation_y = 2.0;
float translation_z = 3.0;
float rotation_angle_x = 4.0;
float rotation_angle_y = 5.0;
float rotation_angle_z = 6.0;
// Execute operation on GPU
clijx.rigidTransform(input, destination, translation_x, translation_y, translation_z, rotation_angle_x, rotation_angle_y, rotation_angle_z);
// show result
destinationImagePlus = clijx.pull(destination);
destinationImagePlus.show();

// cleanup memory on GPU
clijx.release(input);
clijx.release(destination);
Matlab
% init CLIJ and GPU
clijx = init_clatlabx();

% get input parameters
input = clijx.pushMat(input_matrix);
destination = clijx.create(input);
translation_x = 1.0;
translation_y = 2.0;
translation_z = 3.0;
rotation_angle_x = 4.0;
rotation_angle_y = 5.0;
rotation_angle_z = 6.0;
% Execute operation on GPU
clijx.rigidTransform(input, destination, translation_x, translation_y, translation_z, rotation_angle_x, rotation_angle_y, rotation_angle_z);
% show result
destination = clijx.pullMat(destination)

% cleanup memory on GPU
clijx.release(input);
clijx.release(destination);

Back to CLIJ2 reference Back to CLIJ2 documentation

Imprint