Exemple #1
0
        public Filters(FiltersEnum name)
        {
            Name = name + " filter";
            switch (name)
            {
            case FiltersEnum.ForComputer:
                Price = 300;
                break;

            case FiltersEnum.UV:
                Price = 400;
                break;

            case FiltersEnum.Polarized:
                Price = 200;
                break;
            }
        }
Exemple #2
0
        public static (ImageFilter, FilterParams) GetFilter(FiltersEnum selectedFilter)
        {
            switch (selectedFilter)
            {
            case FiltersEnum.NoFilter:
                return(new NoFilter(), null);

            case FiltersEnum.TestThreshold:
                return(new TestThresholdFilter(), new TestThresholdParams());

            case FiltersEnum.BradleyThresholding:
                return(new BradleysThresholdFilter(), new BradleysThresholdParams());

            case FiltersEnum.GaussianBlur:
                return(new GaussianBlurFilter(), new GaussianBlurParams());

            default:
                throw new InvalidEnumArgumentException("This filter does not exist");
            }
        }