Library/ManagedCuda/NPP/NPPImage_8uC4.cs
/// <summary>
/// Four channel 8-bit unsigned 3D trilinear interpolated look-up-table color conversion, not affecting alpha.<para/>
/// Alpha channel is the last channel and is not processed.<para/>
/// The LUT is derived from a set of user defined mapping points through trilinear interpolation.
/// </summary>
/// <param name="dst">Destination-Image</param>
/// <param name="pValues">Device pointer to aLevels[2] number of contiguous 2D x,y planes of 4-byte packed RGBX values
/// containing the user defined base OUTPUT values at that x,y, and z (R,G,B) level location. Each level must contain x * y 4-byte
/// packed pixel values (4th byte is used for alignement only and is ignored) in row (x) order.</param>
/// <param name="pLevels0">array, cube edge 0, with user defined INPUT level values.</param>
/// <param name="pLevels1">array, cube edge 1, with user defined INPUT level values.</param>
/// <param name="pLevels2">array, cube edge 2, with user defined INPUT level values.</param>
/// <param name="aLevels">Host pointer to an array of 3 user defined number of input/output mapping points, one per 3D cube edge.
/// aLevels[0] represents the number of x axis levels (Red), aLevels[1] represents the number of y axis levels (Green), 
/// and aLevels[2] represets the number of z axis levels (Blue).</param>
Four channel 8-bit unsigned 3D trilinear interpolated look-up-table color conversion, not affecting alpha.
Alpha channel is the last channel and is not processed.
The LUT is derived from a set of user defined mapping points through trilinear interpolation.
Four channel 8 - bit unsigned 3D trilinear interpolated look - up - table color conversion not affecting alpha . Alpha channel is the last channel and is not processed . The LUT is derived from a set of user defined mapping points through trilinear interpolation .
public void LUTTrilinearA(NPPImage_8uC4 dst, CudaDeviceVariable<int> pValues, int[] pLevels0, int[] pLevels1, int[] pLevels2, int[] aLevels)
		{
			GCHandle h0 = new GCHandle(), h1 = new GCHandle(), h2 = new GCHandle();
			try
			{
				h0 = GCHandle.Alloc(pLevels0, GCHandleType.Pinned);
				h1 = GCHandle.Alloc(pLevels1, GCHandleType.Pinned);
				h2 = GCHandle.Alloc(pLevels2, GCHandleType.Pinned);
				IntPtr[] ptrsLevels = new IntPtr[3];
				ptrsLevels[0] = h0.AddrOfPinnedObject();
				ptrsLevels[1] = h1.AddrOfPinnedObject();
				ptrsLevels[2] = h2.AddrOfPinnedObject();
				status = NPPNativeMethods.NPPi.ColorLUTTrilinear.nppiLUT_Trilinear_8u_AC4R(_devPtrRoi, _pitch, dst.DevicePointerRoi, dst.Pitch, _sizeRoi, pValues.DevicePointer, ptrsLevels, aLevels);
				Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiLUT_Trilinear_8u_AC4R", status));
				NPPException.CheckNppStatus(status, this);
			}
			catch (Exception)
			{
				throw;
			}
			finally
			{
				h0.Free();
				h1.Free();
				h2.Free();
			}
		}
public void LUTTrilinearA ( NPPImage_8uC4 dst , CudaDeviceVariable < int > pValues , int [ ] pLevels0 , int [ ] pLevels1 , int [ ] pLevels2 , int [ ] aLevels ) { GCHandle h0 = new GCHandle ( ) , h1 = new GCHandle ( ) , h2 = new GCHandle ( ) ; try { h0 = GCHandle . Alloc ( pLevels0 , GCHandleType . Pinned ) ; h1 = GCHandle . Alloc ( pLevels1 , GCHandleType . Pinned ) ; h2 = GCHandle . Alloc ( pLevels2 , GCHandleType . Pinned ) ; IntPtr [ ] ptrsLevels = new IntPtr [ 3 ] ; ptrsLevels [ 0 ] = h0 . AddrOfPinnedObject ( ) ; ptrsLevels [ 1 ] = h1 . AddrOfPinnedObject ( ) ; ptrsLevels [ 2 ] = h2 . AddrOfPinnedObject ( ) ; status = NPPNativeMethods . NPPi . ColorLUTTrilinear . nppiLUT_Trilinear_8u_AC4R ( _devPtrRoi , _pitch , dst . DevicePointerRoi , dst . Pitch , _sizeRoi , pValues . DevicePointer , ptrsLevels , aLevels ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , status ) ) ; NPPException . CheckNppStatus ( status , this ) ; } catch ( Exception ) { throw ; } finally { h0 . Free ( ) ; h1 . Free ( ) ; h2 . Free ( ) ; } }
Four channel 8-bit unsigned 3D trilinear interpolated look-up-table color conversion, not affecting alpha.
Four channel 8 - bit unsigned 3D trilinear interpolated look - up - table color conversion not affecting alpha .
dst
NPPImage_8uC4
None
pValues
CudaDeviceVariable<int>
Device pointer to aLevels[2] number of contiguous 2D x,y planes of 4-byte packed RGBX values
containing the user defined base OUTPUT values at that x,y, and z (R,G,B) level location. Each level must contain x * y 4-byte
packed pixel values (4th byte is used for alignement only and is ignored) in row (x) order.
Device pointer to aLevels [ 2 ] number of contiguous 2D x y planes of 4 - byte packed RGBX values containing the user defined base OUTPUT values at that x y and z ( R G B ) level location . Each level must contain x * y 4 - byte packed pixel values ( 4th byte is used for alignement only and is ignored ) in row ( x ) order .
pLevels0
int[]
array, cube edge 0, with user defined INPUT level values.
array cube edge 0 with user defined INPUT level values .
pLevels1
int[]
array, cube edge 1, with user defined INPUT level values.
array cube edge 1 with user defined INPUT level values .
pLevels2
int[]
array, cube edge 2, with user defined INPUT level values.
array cube edge 2 with user defined INPUT level values .
aLevels
int[]
Host pointer to an array of 3 user defined number of input/output mapping points, one per 3D cube edge.
aLevels[0] represents the number of x axis levels (Red), aLevels[1] represents the number of y axis levels (Green),
and aLevels[2] represets the number of z axis levels (Blue).
Host pointer to an array of 3 user defined number of input / output mapping points one per 3D cube edge . aLevels [ 0 ] represents the number of x axis levels ( Red ) aLevels [ 1 ] represents the number of y axis levels ( Green ) and aLevels [ 2 ] represets the number of z axis levels ( Blue ) .