/// <summary> /// Set pixel values to nValue. /// </summary> /// <param name="nValue">Value to be set</param> /// <param name="nppStreamCtx">NPP stream context.</param> public void Set(Npp16sc nValue, NppStreamContext nppStreamCtx) { status = NPPNativeMethods_Ctx.NPPi.MemSet.nppiSet_16sc_C1R_Ctx(nValue, _devPtrRoi, _pitch, _sizeRoi, nppStreamCtx); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiSet_16sc_C1R_Ctx", status)); NPPException.CheckNppStatus(status, this); }
/// <summary> /// Divide constant to image, scale by 2^(-nScaleFactor), then clamp to saturated value. Inplace. /// </summary> /// <param name="nConstant">Value</param> /// <param name="nScaleFactor">scaling factor</param> /// <param name="nppStreamCtx">NPP stream context.</param> public void Div(Npp16sc nConstant, int nScaleFactor, NppStreamContext nppStreamCtx) { status = NPPNativeMethods_Ctx.NPPi.DivConst.nppiDivC_16sc_C1IRSfs_Ctx(nConstant, _devPtrRoi, _pitch, _sizeRoi, nScaleFactor, nppStreamCtx); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiDivC_16sc_C1IRSfs_Ctx", status)); NPPException.CheckNppStatus(status, this); }
/// <summary> /// Divide constant to image, scale by 2^(-nScaleFactor), then clamp to saturated value. /// </summary> /// <param name="nConstant">Value</param> /// <param name="dest">Destination image</param> /// <param name="nScaleFactor">scaling factor</param> public void Div(Npp16sc nConstant, NPPImage_16scC1 dest, int nScaleFactor) { status = NPPNativeMethods.NPPi.DivConst.nppiDivC_16sc_C1RSfs(_devPtrRoi, _pitch, nConstant, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nScaleFactor); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiDivC_16sc_C1RSfs", status)); NPPException.CheckNppStatus(status, this); }
/// <summary> /// Multiply constant to image, scale by 2^(-nScaleFactor), then clamp to saturated value. /// </summary> /// <param name="nConstant">Value</param> /// <param name="dest">Destination image</param> /// <param name="nScaleFactor">scaling factor</param> /// <param name="nppStreamCtx">NPP stream context.</param> public void Mul(Npp16sc nConstant, NPPImage_16scC1 dest, int nScaleFactor, NppStreamContext nppStreamCtx) { status = NPPNativeMethods_Ctx.NPPi.MulConst.nppiMulC_16sc_C1RSfs_Ctx(_devPtrRoi, _pitch, nConstant, dest.DevicePointerRoi, dest.Pitch, _sizeRoi, nScaleFactor, nppStreamCtx); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMulC_16sc_C1RSfs_Ctx", status)); NPPException.CheckNppStatus(status, this); }
/// <summary> /// Multiply constant to image, scale by 2^(-nScaleFactor), then clamp to saturated value. Inplace. /// </summary> /// <param name="nConstant">Value</param> /// <param name="nScaleFactor">scaling factor</param> public void Mul(Npp16sc nConstant, int nScaleFactor) { status = NPPNativeMethods.NPPi.MulConst.nppiMulC_16sc_C1IRSfs(nConstant, _devPtrRoi, _pitch, _sizeRoi, nScaleFactor); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "nppiMulC_16sc_C1IRSfs", status)); NPPException.CheckNppStatus(status, this); }