public EditorPageViewModel(ILogger <EditorPageViewModel> logger, IImageFilterService imageFilterService, INavigationService navigationService, IInOutService ioService) { this.logger = logger; this.imageFilterService = imageFilterService; GaussFilterParams = new GaussFilterParams() { Mid = 0.2f, MidTop = 0.2f, LeftMid = 0.2f, RightMid = 0.2f, MidBot = 0.2f }; BinarizationFilterParams = new BinarizationFilterParams() { RedParameter = 0.3f, GreenParameter = 0.6f, BlueParameter = 0.11f, PrecisionParameter = 6, AdjustmentParameter = 0.15f }; CurrentFilters = new ObservableCollection <FilterParamsBase>(); InitializeCommands(); NavigationService = navigationService; this.ioService = ioService; }
//TODO: inject algos public ImageVM() { this.imagePath = IMG_RES_DIR + LENNA_IMG_NAME; this.OpenImage = new RelayCommand((l) => true, OpenFile); this.SaveImage = new RelayCommand((l) => true, SaveFile); this.ProcessImage = new RelayCommand((l) => true, processImageAlgo); this.imageService = new ImageFilterService(); CopyImage(); }