Exemplo n.º 1
0
        public override EImageBW8 Run(EImageBW8 img)
        {
            if (!Enable)
            {
                return(img);
            }
            EImageBW8 imgBw8 = new EImageBW8();

            imgBw8.SetSize(img);
            switch (Type)
            {
            case MorphologyType.Square:
                EasyImage.OpenBox(img, imgBw8, Width);
                break;

            case MorphologyType.Rectangle:
                EasyImage.OpenBox(img, imgBw8, Width, Height);
                break;

            case MorphologyType.Circle:
                EasyImage.OpenDisk(img, imgBw8, Width);
                break;

            default: EasyImage.OpenBox(img, imgBw8, Width);
                break;
            }
            img.Dispose();
            img = new EImageBW8();
            return(imgBw8);
        }