Beispiel #1
0
        public ImageProcessorViewModel()
        {
            manager = new ProcessorManager(this);

            LoadImageCommand = new RelayCommand(LoadNewImage);
            SaveImageCommand = new RelayCommand(SaveImage);

            BinarizeCommand = new RelayCommand(TrigerImageOperation(Operations[1]));
            ToGrayWithEyeAdaptationCommand = new RelayCommand(TrigerImageOperation(Operations[2]));
            ToGrayAverageCommand           = new RelayCommand(TrigerImageOperation(Operations[3]));
            EdgeDetectLaplaceCommand       = new RelayCommand(TrigerImageOperation(Operations[4]));
            EdgeDetectDiagonalCommand      = new RelayCommand(TrigerImageOperation(Operations[5]));
            EdgeDetectHorizontalCommand    = new RelayCommand(TrigerImageOperation(Operations[6]));
            EdgeDetectVerticalCommand      = new RelayCommand(TrigerImageOperation(Operations[7]));

            SculptureEastCommand      = new RelayCommand(TrigerImageOperation(Operations[8]));
            SculptureSouthEastCommand = new RelayCommand(TrigerImageOperation(Operations[9]));

            UpperProofFilterCommand      = new RelayCommand(TrigerImageOperation(Operations[10]));
            LowerProofFilterBlurNCommand = new RelayCommand(TrigerImageOperation(Operations[11]));
            LowerProofFilterGaussCommand = new RelayCommand(TrigerImageOperation(Operations[12]));

            SetOperationToDefaultFilterCommand = new RelayCommand((o) => CurrentOperation = Operations[13]);
            DefaultFilterGaussCommand          = new RelayCommand(TrigerImageOperation(Operations[13]));
            HistogramStretchingCommand         = new RelayCommand(TrigerImageOperation(Operations[14]));
            ShowOrginalImageCommand            = new RelayCommand((o => manager.Reset()));
            NegationCommand              = new RelayCommand(TrigerImageOperation(Operations[15]));
            CalculateHistogramCommand    = new RelayCommand(CalculateHistogram);
            HistogramEqualizationCommand = new RelayCommand(TrigerImageOperation(Operations[16]));

            BrightnessOperation = new BrightnessImageOperation();
            BrightnessCommand   = new RelayCommand(TrigerImageOperation(BrightnessOperation));

            ContrastOperation = new ContrastImageOperation();
            ContrastCommand   = new RelayCommand(TrigerImageOperation(ContrastOperation));

            ThresholdingOperation = new ThresholdingImageOperation();
            ThresholdingCommand   = new RelayCommand(TrigerImageOperation(ThresholdingOperation));
        }