Пример #1
0
        public static int dpixResizeImageData(this DPix dpixd, DPix dpixs)
        {
            if (null == dpixs)
            {
                throw new ArgumentNullException("dpixs cannot be null.");
            }

            return(Native.DllImports.dpixResizeImageData((HandleRef)dpixd, (HandleRef)dpixs));
        }
Пример #2
0
        public static int dpixSetPixel(this DPix dpix, int x, int y, double val)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null.");
            }

            return(Native.DllImports.dpixSetPixel((HandleRef)dpix, x, y, val));
        }
Пример #3
0
        public static int dpixChangeRefcount(this DPix dpix, int delta)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null.");
            }

            return(Native.DllImports.dpixChangeRefcount((HandleRef)dpix, delta));
        }
Пример #4
0
        public static int dpixSetAllArbitrary(this DPix dpix, double inval)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null");
            }

            return(Native.DllImports.dpixSetAllArbitrary((HandleRef)dpix, inval));
        }
Пример #5
0
        public static int dpixSetWpl(this DPix dpix, int wpl)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null.");
            }

            return(Native.DllImports.dpixSetWpl((HandleRef)dpix, wpl));
        }
Пример #6
0
        public static int dpixGetMax(this DPix dpix, out double pmaxval, out int pxmaxloc, out int pymaxloc)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null");
            }

            return(Native.DllImports.dpixGetMax((HandleRef)dpix, out pmaxval, out pxmaxloc, out pymaxloc));
        }
Пример #7
0
        public static IntPtr dpixGetData(this DPix dpix)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null.");
            }

            return(Native.DllImports.dpixGetData((HandleRef)dpix));
        }
Пример #8
0
        public static int dpixAddMultConstant(this DPix dpix, double addc, double multc)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null");
            }

            return(Native.DllImports.dpixAddMultConstant((HandleRef)dpix, addc, multc));
        }
Пример #9
0
        public static int dpixSetResolution(this DPix dpix, int xres, int yres)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null.");
            }

            return(Native.DllImports.dpixSetResolution((HandleRef)dpix, xres, yres));
        }
Пример #10
0
        // DPix accessors
        public static int dpixGetDimensions(this DPix dpix, out int pw, out int ph)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.dpixGetDimensions((HandleRef)dpix, out pw, out ph));
        }
Пример #11
0
        public static int dpixWriteStream(IntPtr fp, DPix dpix)
        {
            if (IntPtr.Zero == fp ||
                null == dpix)
            {
                throw new ArgumentNullException("fp, boxa cannot be null");
            }

            return(Native.DllImports.dpixWriteStream(fp, (HandleRef)dpix));
        }
Пример #12
0
        public static int dpixCopyResolution(this DPix dpixd, DPix dpixs)
        {
            if (null == dpixd ||
                null == dpixs)
            {
                throw new ArgumentNullException("dpixs, dpixd cannot be null.");
            }

            return(Native.DllImports.fpixCopyResolution((HandleRef)dpixd, (HandleRef)dpixs));
        }
Пример #13
0
        public static int dpixWriteMem(out IntPtr pdata, IntPtr psize, DPix dpix)
        {
            if (IntPtr.Zero == psize ||
                null == dpix)
            {
                throw new ArgumentNullException("psize, dpix cannot be null");
            }

            return(Native.DllImports.dpixWriteMem(out pdata, psize, (HandleRef)dpix));
        }
Пример #14
0
        public static int dpixSetData(this DPix dpix, IntPtr data)
        {
            if (null == dpix ||
                IntPtr.Zero == data)
            {
                throw new ArgumentNullException("dpix, data cannot be null.");
            }

            return(Native.DllImports.fpixSetData((HandleRef)dpix, data));
        }
Пример #15
0
        public static void dpixDestroy(this DPix pdpix)
        {
            if (null == pdpix)
            {
                throw new ArgumentNullException("pdpix cannot be null");
            }

            var pointer = (IntPtr)pdpix;

            Native.DllImports.dpixDestroy(ref pointer);
        }
Пример #16
0
        public static int dpixWrite(string filename, DPix dpix)
        {
            if (string.IsNullOrWhiteSpace(filename))
            {
                throw new ArgumentNullException("filename cannot be null");
            }
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null");
            }

            return(Native.DllImports.dpixWrite(filename, (HandleRef)dpix));
        }
Пример #17
0
        public static Pix dpixConvertToPix(this DPix dpixs, int outdepth, int negvals, int errorflag)
        {
            if (null == dpixs)
            {
                throw new ArgumentNullException("dpixs cannot be null");
            }

            var pointer = Native.DllImports.dpixConvertToPix((HandleRef)dpixs, outdepth, negvals, errorflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Пример #18
0
        public static DPix dpixScaleByInteger(this DPix dpixs, int factor)
        {
            if (null == dpixs)
            {
                throw new ArgumentNullException("dpixs cannot be null");
            }

            var pointer = Native.DllImports.dpixScaleByInteger((HandleRef)dpixs, factor);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new DPix(pointer));
            }
        }
Пример #19
0
        public static DPix dpixClone(this DPix dpix)
        {
            if (null == dpix)
            {
                throw new ArgumentNullException("dpix cannot be null.");
            }

            var pointer = Native.DllImports.dpixClone((HandleRef)dpix);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new DPix(pointer));
            }
        }
Пример #20
0
        public static DPix dpixEndianByteSwap(this DPix dpixd, DPix dpixs)
        {
            if (null == dpixs)
            {
                throw new ArgumentNullException("dpixs cannot be null");
            }

            var pointer = Native.DllImports.dpixEndianByteSwap((HandleRef)dpixd, (HandleRef)dpixs);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new DPix(pointer));
            }
        }
Пример #21
0
        public static DPix dpixLinearCombination(this DPix dpixd, DPix dpixs1, DPix dpixs2, float a, float b)
        {
            if (null == dpixs1 ||
                null == dpixs2)
            {
                throw new ArgumentNullException("dpixs1, dpixs2 cannot be null");
            }

            var pointer = Native.DllImports.dpixLinearCombination((HandleRef)dpixd, (HandleRef)dpixs1, (HandleRef)dpixs2, a, b);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new DPix(pointer));
            }
        }
Пример #22
0
 public static int pixQuadtreeVariance(this Pix pixs, int nlevels, Pix pix_ma, DPix dpix_msa, out FPixa pfpixa_v, out FPixa pfpixa_rv)
 {
     throw new NotImplementedException();
 }
Пример #23
0
 public static int pixVarianceInRectangle(this Pix pixs, HandleRef box, Pix pix_ma, DPix dpix_msa, out float pvar, out float prvar)
 {
     throw new NotImplementedException();
 }