public static void SetScaledOrder5(this Matrix <float, C4f> targetMat, Matrix <float, C4f> sourceMat,
                                           Func <double, Tup6 <float> > interpolator)
        {
            var scale = sourceMat.Size.ToV2d() / targetMat.Size.ToV2d();

            targetMat.SetScaled36(sourceMat, scale.X, scale.Y, 0.5 * scale.X - 0.5, 0.5 * scale.Y - 0.5,
                                  interpolator, interpolator, C4f.LinCom, C4f.LinCom,
                                  Tensor.Index6SamplesClamped, Tensor.Index6SamplesClamped);
        }
        public static void SetScaledOrder5(this Matrix <byte, C3b> targetMat, Matrix <byte, C3b> sourceMat,
                                           Func <double, Tup6 <float> > interpolator)
        {
            var scale = sourceMat.Size.ToV2d() / targetMat.Size.ToV2d();

            targetMat.SetScaled36(sourceMat, scale.X, scale.Y, 0.5 * scale.X - 0.5, 0.5 * scale.Y - 0.5,
                                  interpolator, interpolator, C3b.LinComRawC3f, C3f.LinCom,
                                  Tensor.Index6SamplesClamped, Tensor.Index6SamplesClamped,
                                  col => col.Map(Col.ByteFromByteInFloatClamped));
        }
        public static void SetScaledOrder5(this Matrix <ushort, C4us> targetMat, Matrix <ushort, C4us> sourceMat,
                                           Func <double, Tup6 <float> > interpolator)
        {
            var scale = sourceMat.Size.ToV2d() / targetMat.Size.ToV2d();

            targetMat.SetScaled36(sourceMat, scale.X, scale.Y, 0.5 * scale.X - 0.5, 0.5 * scale.Y - 0.5,
                                  interpolator, interpolator, C4us.LinComRawC4f, C4f.LinCom,
                                  Tensor.Index6SamplesClamped, Tensor.Index6SamplesClamped,
                                  col => col.Map(Col.UShortFromUShortInFloatClamped));
        }
Beispiel #4
0
        public static void SetScaledOrder5(this Matrix <__dtct__> targetMat, Matrix <__dtct__> sourceMat,
                                           Func <double, Tup6 <float> > interpolator)
        {
            var scale = sourceMat.Size.ToV2d() / targetMat.Size.ToV2d();

            targetMat.SetScaled36(sourceMat, scale.X, scale.Y, 0.5 * scale.X - 0.5, 0.5 * scale.Y - 0.5,
                                  interpolator, interpolator, __ct__.LinCom__rfct__, __fct__.LinCom,
                                  Tensor.Index6SamplesClamped, Tensor.Index6SamplesClamped /*#
                                                                                            * if (clampVal) { */,
                                  Col.__dtn__From__dtn__InFloatClamped /*#
                                                                        * } else if (clampMap) { */,
                                  col => col.Map(Col.__dtn__From__dtn__InFloatClamped) /*# } */);
        }