Class OpenCLAlgorithmConvolver
java.lang.Object
gov.nih.mipav.model.algorithms.filters.OpenCL.filters.OpenCLAlgorithmConvolver
OpenCL Algorithm convolves a kernel with a 2D, 3D or 4D image.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvolveSep2D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<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<FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask, boolean clipZ)
-
Constructor Details
-
OpenCLAlgorithmConvolver
public OpenCLAlgorithmConvolver()
-
-
Method Details
-
convolveSep2D
public static void convolveSep2D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask) - Parameters:
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).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.cl- the current cl context.size- the size of the image.
-
convolveSep3D
public static void convolveSep3D(com.jogamp.opencl.CLContext context, com.jogamp.opencl.CLDevice device, com.jogamp.opencl.CLBuffer<FloatBuffer> inputBuffer, boolean loadInput, com.jogamp.opencl.CLBuffer<FloatBuffer> outputBuffer, int width, int height, int depth, int globalWorkSize, Kernel kKernel, int color, int[] colorMask, boolean clipZ) - Parameters:
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.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.cl- the current cl context.size- the size of the image.
-