private void ToolStripMenuItem_GeometricalResize(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); cImageGeometricResize GR = new cImageGeometricResize(); GR.SetInputData(this.AssociatedImage); GR.SliceIndex = (int)ZNavigator.numericUpDownZPos.Value; GR.InterpolationType = Emgu.CV.CvEnum.Inter.Linear; GR.ListProperties.FindByName("Scale").SetNewValue((double)0.5); GR.ListProperties.FindByName("Scale").IsGUIforValue = true; GR.ListProperties.FindByName("Maximum Width").SetNewValue((int)0); GR.ListProperties.FindByName("Maximum Width").IsGUIforValue = true; cFeedBackMessage FeedBackMessage = GR.Run(); cGlobalInfo.WindowHCSAnalyzer.richTextBoxConsole.AppendText(FeedBackMessage.GetFullFeedBack()); if (FeedBackMessage.IsSucceed == false) return; cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.SetInputData(GR.GetOutPut()); NewView.Run(); //NewView.LUTManager.UpdateFromDisplayProperties(TmpProp); }
private void ToolStripMenuItem_Morpho_Erode(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); cImageMorphoErode ME = new cImageMorphoErode(); ME.SetInputData(this.AssociatedImage); ME.Iterations = 3; ME.Run(); NewView.SetInputData(ME.GetOutPut()); NewView.Run(); cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.MyImageViewer.IP.LUTManager.UpdateFromDisplayProperties(TmpProp); }
private void ToolStripMenuItem_GeometricalFlip(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); cImageGeometricFlip GF = new cImageGeometricFlip(); GF.SetInputData(this.AssociatedImage); GF.ListProperties.FindByName("Horizontal").SetNewValue((bool)true); GF.ListProperties.FindByName("Horizontal").IsGUIforValue = true; cFeedBackMessage FeedBackMessage = GF.Run(); cGlobalInfo.WindowHCSAnalyzer.richTextBoxConsole.AppendText(FeedBackMessage.GetFullFeedBack()); if (FeedBackMessage.IsSucceed == false) return; cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.SetInputData(GF.GetOutPut()); NewView.Run(); //NewView.LUTManager.UpdateFromDisplayProperties(TmpProp); }
private void ToolStripMenuItem_GeometricalCrop(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); Point Bottom = new Point(mRect.Left, mRect.Top); Point ConvertedBottom = ConvertPanelCoordToImageCoord(Bottom); Point Top = new Point(mRect.Right, mRect.Bottom); Point ConvertedTop = ConvertPanelCoordToImageCoord(Top); cImage CroppedImage = this.AssociatedImage.Crop(new cPoint3D(ConvertedBottom.X, ConvertedBottom.Y, 0), new cPoint3D(ConvertedTop.X, ConvertedTop.Y, 0)); cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.SetInputData(CroppedImage); NewView.Run(); NewView.MyImageViewer.IP.LUTManager.UpdateFromDisplayProperties(TmpProp); }
private void ToolStripMenuItem_Filtering_Median(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); cImageFilterMedian FM = new cImageFilterMedian(); FM.SetInputData(this.AssociatedImage); FM.ListProperties.FindByName("Kernel Size").SetNewValue((int)5); FM.ListProperties.FindByName("Kernel Size").IsGUIforValue = true; cFeedBackMessage FeedBackMessage = FM.Run(); //GlobalInfo.WindowHCSAnalyzer.richTextBoxConsole.AppendText(FeedBackMessage.GetFullFeedBack()); if (FeedBackMessage.IsSucceed == false) return; NewView.SetInputData(FM.GetOutPut()); NewView.Run(); cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.MyImageViewer.IP.LUTManager.UpdateFromDisplayProperties(TmpProp); //GlobalInfo.DisplayViewer(NewView); }
private void ToolStripMenuItem_Filtering_GaussianConvolution(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); ImageAnalysisFiltering.cImageFilterGaussianConvolution GaussianBlur = new ImageAnalysisFiltering.cImageFilterGaussianConvolution(); GaussianBlur.SetInputData(this.AssociatedImage); GaussianBlur.ListProperties.FindByName("Kernel Size").SetNewValue((int)3); GaussianBlur.ListProperties.FindByName("Kernel Size").IsGUIforValue = true; cFeedBackMessage FeedBackMessage = GaussianBlur.Run(); if (FeedBackMessage.IsSucceed == false) return; NewView.SetInputData(GaussianBlur.GetOutPut()); NewView.Run(); cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.MyImageViewer.IP.LUTManager.UpdateFromDisplayProperties(TmpProp); }
private void ToolStripMenuItem_AddNoise(object sender, EventArgs e) { cDisplaySingleImage NewView = new cDisplaySingleImage(); cImageAddNoise AN = new cImageAddNoise(); AN.SetInputData(this.AssociatedImage); AN.DistributionType = Classes.Base_Classes.Data.eRandDistributionType.GAUSSIAN; AN.Mean = 0; AN.Stdev = 10; //FLM.DistanceType = Emgu.CV.CvEnum.DIST_TYPE.CV_DIST_L2; AN.Run(); NewView.SetInputData(AN.GetOutPut()); NewView.Run(); cImageDisplayProperties TmpProp = new cImageDisplayProperties(); TmpProp.UpdateFromLUTManager(this.LUTManager); NewView.MyImageViewer.IP.LUTManager.UpdateFromDisplayProperties(TmpProp); }