public PageDeconvolve(ImageFWrapper image, PSF psf) : this() { BaseImage = image; Rc = new RichardsonLucyDeconvolution(image.Image, psf); ResultImage = new ImageFWrapper(Rc.Sn); }
public PageSelect() { InitializeComponent(); this.Zoom = 1.0; viewBox.DataContext = this; CommandBinding cb = new CommandBinding(ApplicationCommands.Open); cb.Executed += new ExecutedRoutedEventHandler(cb_Executed); this.CommandBindings.Add(cb); CommandBinding cb1 = new CommandBinding(NavigationCommands.Zoom); cb1.Executed += new ExecutedRoutedEventHandler(cb1_Executed); this.CommandBindings.Add(cb1); ImageF image = ImageF.RandomPixelImage(10, 10, 1); Psf = PSF.SymmetricGaussian(0.5); Picture = new ImageFWrapper(image); theImage.Source = Picture.Bitmap; viewBox.Width = theImage.Width; viewBox.Height = theImage.Height; }
void cb_Executed(object sender, ExecutedRoutedEventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == true) { Picture = new ImageFWrapper(ImageF.FromFile(dlg.FileName)); theImage.Source = Picture.Bitmap; viewBox.Width = theImage.Width; viewBox.Height = theImage.Height; } }