public SingleResultViewModel() { HistogramVm = new HistogramVM(Histogram); EnlargeResultImage = new RelayCommand(() => ShowImageInFullWindow(ResultImage, ResultBitmap)); EnlargePhaseImage = new RelayCommand(() => ShowImageInFullWindow(PhaseImage, PhaseBitmap)); EnlargeMagnitudeImage = new RelayCommand(() => ShowImageInFullWindow(MagnitudeImage, MagnitudeBitmap)); }
public async void LoadData(ImageComponents imageComponents) { await Task.Run(() => { Histogram = ImageProcessor.CreateHistogram(imageComponents.Image); }); ImageComponents = imageComponents; HistogramVm = new HistogramVM(Histogram); ResultBitmap = ImageComponents.Image; ResultImage = ImageGdiHelper.LoadBitmap(ImageComponents.Image); PhaseBitmap = ImageComponents.PhaseImage; PhaseImage = ImageGdiHelper.LoadBitmap(ImageComponents.PhaseImage); MagnitudeBitmap = ImageComponents.MagnitudeImage; MagnitudeImage = ImageGdiHelper.LoadBitmap(ImageComponents.MagnitudeImage); }
public async void LoadData(Bitmap bitmap) { await Task.Run(() => { Histogram = ImageProcessor.CreateHistogram(bitmap); ImageComponents = FastFourierTransform.FFT2D(bitmap); }); HistogramVm = new HistogramVM(Histogram); ResultBitmap = ImageComponents.Image; ResultImage = ImageGdiHelper.LoadBitmap(ImageComponents.Image); PhaseBitmap = ImageComponents.PhaseImage; PhaseImage = ImageGdiHelper.LoadBitmap(ImageComponents.PhaseImage); MagnitudeBitmap = ImageComponents.MagnitudeImage; MagnitudeImage = ImageGdiHelper.LoadBitmap(ImageComponents.MagnitudeImage); }