ManagedCuda.NPP.NPPImage_8uC3.LUTPaletteSwap C# (CSharp) Method

LUTPaletteSwap() public method

Three channel 8-bit unsigned source bit range restricted palette look-up-table color conversion to four channel 8-bit unsigned destination output with alpha. The LUT is derived from a set of user defined mapping points in a palette and source pixels are then processed using a restricted bit range when looking up palette values. This function also reverses the source pixel channel order in the destination so the Alpha channel is the first channel.
public LUTPaletteSwap ( NPPImage_8uC4 dst, int nAlphaValue, CudaDeviceVariable pTables0, CudaDeviceVariable pTables1, CudaDeviceVariable pTables2, int nBitSize ) : void
dst NPPImage_8uC4 Destination image
nAlphaValue int Signed alpha value that will be used to initialize the pixel alpha channel position in all modified destination pixels.
pTables0 CudaDeviceVariable Host pointer to an array of 3 device memory pointers, channel 0, pointing to user defined OUTPUT palette values. /// Alpha values < 0 or > 255 will cause destination pixel alpha channel values to be unmodified.
pTables1 CudaDeviceVariable Host pointer to an array of 3 device memory pointers, channel 1, pointing to user defined OUTPUT palette values. /// Alpha values < 0 or > 255 will cause destination pixel alpha channel values to be unmodified.
pTables2 CudaDeviceVariable Host pointer to an array of 3 device memory pointers, channel 2, pointing to user defined OUTPUT palette values. /// Alpha values < 0 or > 255 will cause destination pixel alpha channel values to be unmodified.
nBitSize int Number of least significant bits (must be > 0 and <= 8) of each source pixel value to use as index into palette table during conversion.
return void
        public void LUTPaletteSwap(NPPImage_8uC4 dst, int nAlphaValue, CudaDeviceVariable<byte> pTables0, CudaDeviceVariable<byte> pTables1, CudaDeviceVariable<byte> pTables2, int nBitSize)
        {
            CUdeviceptr[] ptrs = new CUdeviceptr[] { pTables0.DevicePointer, pTables1.DevicePointer, pTables2.DevicePointer };
            status = NPPNativeMethods.NPPi.ColorLUTPalette.nppiLUTPaletteSwap_8u_C3A0C4R(_devPtrRoi, _pitch, nAlphaValue, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, ptrs, nBitSize);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiLUTPaletteSwap_8u_C3A0C4R", status));
            NPPException.CheckNppStatus(status, this);
        }
NPPImage_8uC3