예제 #1
0
 public SingleResultViewModel()
 {
     HistogramVm           = new HistogramVM(Histogram);
     EnlargeResultImage    = new RelayCommand(() => ShowImageInFullWindow(ResultImage, ResultBitmap));
     EnlargePhaseImage     = new RelayCommand(() => ShowImageInFullWindow(PhaseImage, PhaseBitmap));
     EnlargeMagnitudeImage = new RelayCommand(() => ShowImageInFullWindow(MagnitudeImage, MagnitudeBitmap));
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }