public void doBrightness(int bright) { Bitmap img = new Bitmap(path); BrightnessCorrection filter = new BrightnessCorrection((double)bright / 1000); img = filter.Apply(img); // ImageEView if (mov != null) { this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov); } mov = this.WorkItem.SmartParts.AddNew <ImageEView>(); mov.panAndZoomPictureBox1.Image = img; SmartPartInfo spi = new SmartPartInfo("Brightness Correction", "MyOwnDescription"); this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi); }
public void doGaussian(int sigma, int kernel) { Bitmap imx = new Bitmap(path); GaussianBlur gb = new GaussianBlur((sigma / 10), (kernel * 2 + 1)); imx = gb.Apply(imx); // ImageEView if (mov != null) { this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov); } mov = this.WorkItem.SmartParts.AddNew <ImageEView>(); mov.panAndZoomPictureBox1.Image = imx; SmartPartInfo spi = new SmartPartInfo("Gaussian", "MyOwnDescription"); this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi); }
public void doContrast(int contrast) { Bitmap img = new Bitmap(path); ContrastCorrection filter = new ContrastCorrection(((double)contrast / 1000)); // apply the filter img = filter.Apply(img); //ImageEView if (mov != null) { this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov); } mov = this.WorkItem.SmartParts.AddNew <ImageEView>(); mov.panAndZoomPictureBox1.Image = img; SmartPartInfo spi = new SmartPartInfo("Contrast", "MyOwnDescription"); this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi); }
public void doGamma(int gamma) { Bitmap img = new Bitmap(path); GammaCorrection filter = new GammaCorrection((gamma / 10)); // apply the filter img = filter.Apply(img); // ImageEView if (mov != null) { this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov); } mov = this.WorkItem.SmartParts.AddNew <ImageEView>(); mov.panAndZoomPictureBox1.Image = img; SmartPartInfo spi = new SmartPartInfo("Gamma Correction", "MyOwnDescription"); this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi); }
public void doConservative(int kernel) { Bitmap img = new Bitmap(path); ConservativeSmoothing filter = new ConservativeSmoothing(kernel * 2 + 1); // apply the filter img = filter.Apply(img); // ImageEView if (mov != null) { this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov); } mov = this.WorkItem.SmartParts.AddNew <ImageEView>(); mov.panAndZoomPictureBox1.Image = img; SmartPartInfo spi = new SmartPartInfo("Conservative", "MyOwnDescription"); this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi); }
public void sharpenClickHandler(object sender, EventArgs e) { if (image != null) { Bitmap img = new Bitmap(path); Sharpen filter = new Sharpen(); img = filter.Apply(img); //ImageEView if (mov != null) { this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Close(mov); } mov = this.WorkItem.SmartParts.AddNew <ImageEView>(); mov.panAndZoomPictureBox1.Image = img; SmartPartInfo spi = new SmartPartInfo("Sharpen", "MyOwnDescription"); this.WorkItem.Workspaces[WorkspaceNames.TabWorkspace].Show(mov, spi); } }