public void EdgesClickHandler(object sender, EventArgs e)
 {
     if (image != null)
     {
         Bitmap imx = new Bitmap(path);
         Edges  gb  = new Edges();
         imx = gb.Apply(imx);
         if (mov != null)
         {
             this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov);
         }
         mov = this.WorkItem.SmartParts.AddNew <ImageAView>();
         mov.panAndZoomPictureBox1.Image = imx;
         SmartPartInfo spi =
             new SmartPartInfo("Edges", "MyOwnDescription");
         this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi);
     }
 }
        public void doCanny(int low, int high, int sigma)
        {
            Bitmap imx = new Bitmap(path);

            imx = Grayscale.CommonAlgorithms.Y.Apply(imx);
            CannyEdgeDetector gb = new CannyEdgeDetector(((byte)low), ((byte)high), (sigma / 10));

            imx = gb.Apply(imx);
            if (mov != null)
            {
                this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov);
            }
            mov = this.WorkItem.SmartParts.AddNew <ImageAView>();
            mov.panAndZoomPictureBox1.Image = imx;
            SmartPartInfo spi =
                new SmartPartInfo("Canny", "MyOwnDescription");

            this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi);
        }
 public void DifferenceClickHandler(object sender, EventArgs e)
 {
     if (image != null)
     {
         Bitmap imx = new Bitmap(path);
         imx = Grayscale.CommonAlgorithms.Y.Apply(imx);
         DifferenceEdgeDetector gb = new DifferenceEdgeDetector();
         imx = gb.Apply(imx);
         if (mov != null)
         {
             this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov);
         }
         mov = this.WorkItem.SmartParts.AddNew <ImageAView>();
         mov.panAndZoomPictureBox1.Image = imx;
         SmartPartInfo spi =
             new SmartPartInfo("Difference", "MyOwnDescription");
         this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi);
     }
 }
 public void FourierClickHandler(object sender, EventArgs e)
 {
     if (image != null)
     {
         try
         {
             Bitmap imx = new Bitmap(path);
             // create complex image
             ComplexImage complexImage = ComplexImage.FromBitmap(imx);
             // do forward Fourier transformation
             complexImage.ForwardFourierTransform();
             mov = this.WorkItem.SmartParts.AddNew <ImageAView>();
             // get complex image as bitmap
             mov.panAndZoomPictureBox1.Image = complexImage.ToBitmap();
             SmartPartInfo spi =
                 new SmartPartInfo("Fourier", "MyOwnDescription");
             this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi);
         }
         catch {
             MessageBox.Show("Height and width of images should be power of 2.");
         }
     }
 }