Library/ManagedCuda/NPP/NPPImage_8uC3.cs
/// <summary>
/// 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.
/// </summary>
/// <param name="dst">Destination image</param>
/// <param name="nAlphaValue">Signed alpha value that will be used to initialize the pixel alpha channel position in all modified destination pixels.</param>
/// <param name="pTables0">Host pointer to an array of 3 device memory pointers, channel 0, pointing to user defined OUTPUT palette values.
/// <para/>Alpha values &lt; 0 or &gt; 255 will cause destination pixel alpha channel values to be unmodified.</param>
/// <param name="pTables1">Host pointer to an array of 3 device memory pointers, channel 1, pointing to user defined OUTPUT palette values.
/// <para/>Alpha values &lt; 0 or &gt; 255 will cause destination pixel alpha channel values to be unmodified.</param>
/// <param name="pTables2">Host pointer to an array of 3 device memory pointers, channel 2, pointing to user defined OUTPUT palette values.
/// <para/>Alpha values &lt; 0 or &gt; 255 will cause destination pixel alpha channel values to be unmodified.</param>
/// <param name="nBitSize">Number of least significant bits (must be &gt; 0 and &lt;= 8) of each source pixel value to use as index into palette table during conversion.</param>
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.
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 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);
		}
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 ( " " , DateTime . Now , " " , status ) ) ; NPPException . CheckNppStatus ( status , this ) ; }
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.
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 .
dst
NPPImage_8uC4
None
nAlphaValue
int
Signed alpha value that will be used to initialize the pixel alpha channel position in all modified destination pixels.
Signed alpha value that will be used to initialize the pixel alpha channel position in all modified destination pixels .
pTables0
CudaDeviceVariable<byte>
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.
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<byte>
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.
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<byte>
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.
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.
Number of least significant bits ( must be > 0 and < = 8 ) of each source pixel value to use as index into palette table during conversion .