コード例 #1
0
 public PageDeconvolve(ImageFWrapper image, PSF psf)
     : this()
 {
     BaseImage = image;
     Rc = new RichardsonLucyDeconvolution(image.Image, psf);
     ResultImage = new ImageFWrapper(Rc.Sn);
 }
コード例 #2
0
        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;
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
        }
コード例 #5
0
 public PageDeconvolve(ImageFWrapper image, PSF psf) : this()
 {
     BaseImage   = image;
     Rc          = new RichardsonLucyDeconvolution(image.Image, psf);
     ResultImage = new ImageFWrapper(Rc.Sn);
 }
コード例 #6
0
        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;
            }
        }