Example #1
0
 /**
  * Adda PSF to the images being shown
  *
  * @param aPsf The PSF to add
  */
 public void Add(SpatiallyVariantPsf aPsf)
 {
     iPsfList.Add(aPsf);
     Image psfImage = aPsf.Psf.Bitmap;
     PictureBox picBox = new SelectablePictureBox();
     picBox.Parent = this;
     picBox.Size = _szImage;
     picBox.SizeMode = PictureBoxSizeMode.Zoom;
     picBox.Click += PictureBoxOnClick;
     picBox.Image = psfImage;
 }
Example #2
0
        /**
         * Adda PSF to the images being shown
         *
         * @param aPsf The PSF to add
         */
        public void Add(SpatiallyVariantPsf aPsf)
        {
            iPsfList.Add(aPsf);
            Image      psfImage = aPsf.Psf.Bitmap;
            PictureBox picBox   = new SelectablePictureBox();

            picBox.Parent   = this;
            picBox.Size     = _szImage;
            picBox.SizeMode = PictureBoxSizeMode.Zoom;
            picBox.Click   += PictureBoxOnClick;
            picBox.Image    = psfImage;
        }
Example #3
0
        //private void panelMain_Paint(object sender, PaintEventArgs e)
        //{
        //    if (iImage != null)
        //    {
        //        panelMain.AutoScroll = true;
        //        using (Graphics gfx = panelMain.CreateGraphics())
        //        {
        //            gfx.DrawImage(iImage,
        //                            AutoScrollPosition.X,
        //                            AutoScrollPosition.Y,
        //                            iImage.Width,
        //                            iImage.Height);
        //        }
        //    }
        //}


        private void pictureMain_MouseUp(object sender, MouseEventArgs e)
        {
            if (iImage != null && InPanel)
            {
                Point pos = e.Location;
                //pos.X -= panelImage.AutoScrollPosition.X;
                //pos.Y -= panelImage.AutoScrollPosition.Y;
                PSF thePsf = PSF.FromBitmap(iImageF, pos);
                SpatiallyVariantPsf wrapper = new SpatiallyVariantPsf(thePsf, pos);
                this.imageScan1.Add(wrapper);
                photograph.AddPsf(wrapper);
                picPreviewPsf.Image = thePsf.Bitmap;
            }
        }
Example #4
0
        private void PictureBoxOnClick(object sender, EventArgs e)
        {
            PictureBox picBox = sender as PictureBox;

            foreach (var psf in iPsfList)
            {
                if (psf.Psf.Bitmap.Equals(picBox.Image))
                {
                    PSF = psf;
                    break;
                }
            }

            OnClick(e);
        }
Example #5
0
        private void PictureBoxOnClick(object sender, EventArgs e)
        {
            PictureBox picBox = sender as PictureBox;
            foreach (var psf in iPsfList)
            {
                if (psf.Psf.Bitmap.Equals(picBox.Image))
                {
                    PSF = psf;
                    break;
                }
            }

            OnClick(e);
        }
Example #6
0
 //private void panelMain_Paint(object sender, PaintEventArgs e)
 //{
 //    if (iImage != null)
 //    {
 //        panelMain.AutoScroll = true;
 //        using (Graphics gfx = panelMain.CreateGraphics())
 //        {
 //            gfx.DrawImage(iImage,
 //                            AutoScrollPosition.X,
 //                            AutoScrollPosition.Y,
 //                            iImage.Width,
 //                            iImage.Height);
 //        }
 //    }
 //}
 private void pictureMain_MouseUp(object sender, MouseEventArgs e)
 {
     if (iImage != null && InPanel)
     {
         Point pos = e.Location;
         //pos.X -= panelImage.AutoScrollPosition.X;
         //pos.Y -= panelImage.AutoScrollPosition.Y;
         PSF thePsf = PSF.FromBitmap(iImageF, pos);
         SpatiallyVariantPsf wrapper = new SpatiallyVariantPsf(thePsf, pos);
         this.imageScan1.Add(wrapper);
         photograph.AddPsf(wrapper);
         picPreviewPsf.Image = thePsf.Bitmap;
     }
 }
 /**
  * @brief
  * Add a PSF to the data
  *
  * @param aPsf The PSF to add
  */
 public void AddPsf(SpatiallyVariantPsf aPsf)
 {
     PSFs.Add(aPsf);
 }
 /**
  * @brief
  * Add a PSF to the data
  *
  * @param aPsf The PSF to add
  */
 public void AddPsf(SpatiallyVariantPsf aPsf)
 {
     PSFs.Add(aPsf);
 }