Class OpenCLAlgorithmConvolver


  • public class OpenCLAlgorithmConvolver
    extends java.lang.Object
    OpenCL Algorithm convolves a kernel with a 2D, 3D or 4D image.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void convolveSep2D​(org.jocl.cl_context cl, org.jocl.cl_device_id device, org.jocl.cl_mem inputBuffer, org.jocl.cl_mem outputBuffer, int width, int height, int depth, int size, Kernel kKernel, int color, int[] colorMask)  
      static void convolveSep3D​(org.jocl.cl_context cl, org.jocl.cl_device_id device, org.jocl.cl_mem inputBuffer, org.jocl.cl_mem outputBuffer, int width, int height, int depth, int size, Kernel kKernel, int color, int[] colorMask, boolean clipZ)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpenCLAlgorithmConvolver

        public OpenCLAlgorithmConvolver()
    • Method Detail

      • convolveSep2D

        public static void convolveSep2D​(org.jocl.cl_context cl,
                                         org.jocl.cl_device_id device,
                                         org.jocl.cl_mem inputBuffer,
                                         org.jocl.cl_mem outputBuffer,
                                         int width,
                                         int height,
                                         int depth,
                                         int size,
                                         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​(org.jocl.cl_context cl,
                                         org.jocl.cl_device_id device,
                                         org.jocl.cl_mem inputBuffer,
                                         org.jocl.cl_mem outputBuffer,
                                         int width,
                                         int height,
                                         int depth,
                                         int size,
                                         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.