Ejemplo n.º 1
0
        public static int fpixSetResolution(this FPix fpix, int xres, int yres)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.fpixSetResolution((HandleRef)fpix, xres, yres));
        }
Ejemplo n.º 2
0
        // Set all
        public static int fpixSetAllArbitrary(this FPix fpix, float inval)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null");
            }

            return(Native.DllImports.fpixSetAllArbitrary((HandleRef)fpix, inval));
        }
Ejemplo n.º 3
0
        // FPix accessors
        public static int fpixGetDimensions(this FPix fpix, out int pw, out int ph)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.fpixGetDimensions((HandleRef)fpix, out pw, out ph));
        }
Ejemplo n.º 4
0
        public static IntPtr fpixGetData(this FPix fpix)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.fpixGetData((HandleRef)fpix));
        }
Ejemplo n.º 5
0
        public static int fpixSetPixel(this FPix fpix, int x, int y, float val)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.fpixSetPixel((HandleRef)fpix, x, y, val));
        }
Ejemplo n.º 6
0
        public static int fpixResizeImageData(this FPix fpixd, FPix fpixs)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("fpixs cannot be null.");
            }

            return(Native.DllImports.fpixResizeImageData((HandleRef)fpixd, (HandleRef)fpixs));
        }
Ejemplo n.º 7
0
        public static int fpixAddMultConstant(this FPix fpix, float addc, float multc)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null");
            }

            return(Native.DllImports.fpixAddMultConstant((HandleRef)fpix, addc, multc));
        }
Ejemplo n.º 8
0
        public static int fpixGetMax(this FPix fpix, out float pmaxval, out int pxmaxloc, out int pymaxloc)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null");
            }

            return(Native.DllImports.fpixGetMax((HandleRef)fpix, out pmaxval, out pxmaxloc, out pymaxloc));
        }
Ejemplo n.º 9
0
        public static int fpixChangeRefcount(this FPix fpix, int delta)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.fpixChangeRefcount((HandleRef)fpix, delta));
        }
Ejemplo n.º 10
0
        public static int fpixSetWpl(this FPix fpix, int wpl)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            return(Native.DllImports.fpixSetWpl((HandleRef)fpix, wpl));
        }
Ejemplo n.º 11
0
        public static int fpixCopyResolution(this FPix fpixd, FPix fpixs)
        {
            if (null == fpixs ||
                null == fpixd)
            {
                throw new ArgumentNullException("fpixs, fpixd cannot be null.");
            }

            return(Native.DllImports.fpixCopyResolution((HandleRef)fpixd, (HandleRef)fpixs));
        }
Ejemplo n.º 12
0
        public static int fpixSetData(this FPix fpix, IntPtr data)
        {
            if (null == fpix ||
                IntPtr.Zero == data)
            {
                throw new ArgumentNullException("fpix, data cannot be null.");
            }

            return(Native.DllImports.fpixSetData((HandleRef)fpix, data));
        }
Ejemplo n.º 13
0
        // FPixa addition
        public static int fpixaAddFPix(this FPixa fpixa, FPix fpix, int copyflag)
        {
            if (null == fpixa ||
                null == fpix)
            {
                throw new ArgumentNullException("fpixa, fpix cannot be null.");
            }

            return(Native.DllImports.fpixaAddFPix((HandleRef)fpixa, (HandleRef)fpix, copyflag));
        }
Ejemplo n.º 14
0
        public static int fpixWriteMem(out IntPtr pdata, IntPtr psize, FPix fpix)
        {
            if (IntPtr.Zero == psize ||
                null == fpix)
            {
                throw new ArgumentNullException("psize, fpix cannot be null");
            }

            return(Native.DllImports.fpixWriteMem(out pdata, psize, (HandleRef)fpix));
        }
Ejemplo n.º 15
0
        // FPix simple rasterop
        public static int fpixRasterop(this FPix fpixd, int dx, int dy, int dw, int dh, FPix fpixs, int sx, int sy)
        {
            if (null == fpixd ||
                null == fpixs)
            {
                throw new ArgumentNullException("fpixd, fpixs cannot be null");
            }

            return(Native.DllImports.fpixRasterop((HandleRef)fpixd, dx, dy, dw, dh, (HandleRef)fpixs, sx, sy));
        }
Ejemplo n.º 16
0
        // Print FPix(subsampled, for debugging)
        public static int fpixPrintStream(IntPtr fp, FPix fpix, int factor)
        {
            if (IntPtr.Zero == fp ||
                null == fpix)
            {
                throw new ArgumentNullException("fp, fpix cannot be null");
            }

            return(Native.DllImports.fpixPrintStream(fp, (HandleRef)fpix, factor));
        }
Ejemplo n.º 17
0
        public static void fpixDestroy(this FPix pfpix)
        {
            if (null == pfpix)
            {
                throw new ArgumentNullException("pfpix cannot be null");
            }

            var pointer = (IntPtr)pfpix;

            Native.DllImports.fpixDestroy(ref pointer);
        }
Ejemplo n.º 18
0
        public static int fpixWrite(string filename, FPix fpix)
        {
            if (string.IsNullOrWhiteSpace(filename))
            {
                throw new ArgumentNullException("filename cannot be null");
            }
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null");
            }

            return(Native.DllImports.fpixWrite(filename, (HandleRef)fpix));
        }
Ejemplo n.º 19
0
        public static int pixWindowedVariance(this Pix pixm, Pix pixms, out FPix pfpixv, out FPix pfpixrv)
        {
            if (null == pixms ||
                null == pixm)
            {
                throw new ArgumentNullException("pixms cannot be null.");
            }

            IntPtr pfpixvPtr, pfpixrvPtr;
            var    result = Native.DllImports.pixWindowedVariance((HandleRef)pixm, (HandleRef)pixms, out pfpixvPtr, out pfpixrvPtr);

            pfpixv  = new FPix(pfpixvPtr);
            pfpixrv = new FPix(pfpixrvPtr);

            return(result);
        }
Ejemplo n.º 20
0
        // Convolution for mean, mean square, variance and rms deviation in specified window
        public static int pixWindowedStats(this Pix pixs, int wc, int hc, int hasborder, out Pix ppixm, out Pix ppixms, out FPix pfpixv, out FPix pfpixrv)
        {
            if (null == pixs)
            {
                throw new ArgumentNullException("pixs cannot be null.");
            }

            IntPtr ppixmPtr, ppixmsPtr, pfpixvPtr, pfpixrvPtr;
            var    result = Native.DllImports.pixWindowedStats((HandleRef)pixs, wc, hc, hasborder, out ppixmPtr, out ppixmsPtr, out pfpixvPtr, out pfpixrvPtr);

            ppixm   = new Pix(ppixmPtr);
            ppixms  = new Pix(ppixmsPtr);
            pfpixv  = new FPix(pfpixvPtr);
            pfpixrv = new FPix(pfpixrvPtr);

            return(result);
        }
Ejemplo n.º 21
0
        public static Pix fpixAutoRenderContours(this FPix fpix, int ncontours)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null");
            }

            var pointer = Native.DllImports.fpixAutoRenderContours((HandleRef)fpix, ncontours);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Ejemplo n.º 22
0
        // Integer scaling
        public static FPix fpixScaleByInteger(this FPix fpixs, int factor)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("fpixs cannot be null");
            }

            var pointer = Native.DllImports.fpixScaleByInteger((HandleRef)fpixs, factor);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new FPix(pointer));
            }
        }
Ejemplo n.º 23
0
        public static FPix fpixAddSlopeBorder(this FPix fpixs, int left, int right, int top, int bot)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("fpixs cannot be null");
            }

            var pointer = Native.DllImports.fpixAddSlopeBorder((HandleRef)fpixs, left, right, top, bot);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new FPix(pointer));
            }
        }
Ejemplo n.º 24
0
        public static FPix fpixEndianByteSwap(this FPix fpixd, FPix fpixs)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("fpixs cannot be null");
            }

            var pointer = Native.DllImports.fpixEndianByteSwap((HandleRef)fpixd, (HandleRef)fpixs);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new FPix(pointer));
            }
        }
Ejemplo n.º 25
0
        public static FPix fpixRotate90(this FPix fpixs, int direction)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("fpixs cannot be null");
            }

            var pointer = Native.DllImports.fpixRotate90((HandleRef)fpixs, direction);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new FPix(pointer));
            }
        }
Ejemplo n.º 26
0
        public static FPix fpixClone(this FPix fpix)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null.");
            }

            var pointer = Native.DllImports.fpixClone((HandleRef)fpix);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new FPix(pointer));
            }
        }
Ejemplo n.º 27
0
        public static Pix fpixConvertToPix(this FPix fpixs, int outdepth, int negvals, int errorflag)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("pixs cannot be null");
            }

            var pointer = Native.DllImports.fpixConvertToPix((HandleRef)fpixs, outdepth, negvals, errorflag);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Ejemplo n.º 28
0
        // Thresholding to 1 bpp Pix
        public static Pix fpixThresholdToPix(this FPix fpix, float thresh)
        {
            if (null == fpix)
            {
                throw new ArgumentNullException("fpix cannot be null");
            }

            var pointer = Native.DllImports.fpixThresholdToPix((HandleRef)fpix, thresh);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Ejemplo n.º 29
0
        public static Pix fpixDisplayMaxDynamicRange(this FPix fpixs)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("pixs cannot be null");
            }

            var pointer = Native.DllImports.fpixDisplayMaxDynamicRange((HandleRef)fpixs);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }
Ejemplo n.º 30
0
        public static Pix fpixRenderContours(this FPix fpixs, float incr, float proxim)
        {
            if (null == fpixs)
            {
                throw new ArgumentNullException("fpixs cannot be null");
            }

            var pointer = Native.DllImports.fpixRenderContours((HandleRef)fpixs, incr, proxim);

            if (IntPtr.Zero == pointer)
            {
                return(null);
            }
            else
            {
                return(new Pix(pointer));
            }
        }