Class OpenCLAlgorithmConvolver
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.filters.OpenCL.filters.OpenCLAlgorithmConvolver
-
public class OpenCLAlgorithmConvolver extends java.lang.ObjectOpenCL Algorithm convolves a kernel with a 2D, 3D or 4D image.
-
-
Constructor Summary
Constructors Constructor Description OpenCLAlgorithmConvolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconvolveSep2D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask)static voidconvolveSep3D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask, boolean clipZ)
-
-
-
Method Detail
-
convolveSep2D
public static void convolveSep2D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask)- Parameters:
cl- the current cl context.device- the cl device to run the OpenCL code on.inputBuffer- the cl_mem buffer containing the input image data.outputBuffer- the cl_mem buffer for the output data.width- input image width.height- input image height.depth- input image depth (0 for 2D, number of slices for 25D).size- the size of the image.kKernel- the Kernel containing the separable convolution kernels.color- when 1, the input image is a MIPAV color image.colorMask- the color mask, which determines how the RGB channels of the color image are treated in the convolution.
-
convolveSep3D
public static void convolveSep3D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<java.nio.FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask, boolean clipZ)- Parameters:
cl- the current cl context.device- the cl device to run the OpenCL code on.inputBuffer- the cl_mem buffer containing the input image data.outputBuffer- the cl_mem buffer for the output data.width- input image width.height- input image height.depth- input image depth.size- the size of the image.kKernel- the Kernel containing the separable convolution kernels.color- when 1, the input image is a MIPAV color image.colorMask- the color mask, which determines how the RGB channels of the color image are treated in the convolution.clipZ- when true the z-component of the convolution kernel is applied only where it overlaps entirely with the input image, otherwise the z-component of the convolution kernel is truncated and applied to all image slices.
-
-