void ShowSigleProfile(SagensSdk.Profile profile) { SagensSdk.ProfilePoint[] point = profile.points; double[] row, col; GetRowCol(point, out row, out col); HTuple RowNew, ColNew; HObject Region, Contour, ConstImage; GenProfile(true, row, col, out RowNew, out ColNew, out Region, out Contour); HOperatorSet.GenImageConst(out ConstImage, "byte", 1000, 1000); sw.hwnd[0].HobjectToHimage(ConstImage); sw.hwnd[0].viewWindow.displayHobject(Region, "red"); }
void GoSDK_ProfileRecFinish() { if (!ShowWitch.ShowProfile) { return; } SagensSdk.Profile profile = MyGlobal.GoSDK.SigleProfile; if (profile.points != null) { ShowSigleProfile(profile); if (ShowWitch.SaveCache) { int len = MyGlobal.GoSDK.ProfileList.Count; Action Show = () => { if (ShowWitch.ShowIPicture) { HObject image = new HObject(); if (MyGlobal.GoSDK.ProfileList.Count > 0) { GenIntesityProfile(MyGlobal.GoSDK.ProfileList, out image); sw.hwnd[2].HobjectToHimage(image); } } textBox_Total.Text = len.ToString(); CurrentIndex = len; trackBarControl1.Properties.Maximum = CurrentIndex; trackBarControl1.Properties.Minimum = 1; textBox_Current.Text = "1"; }; this.Invoke(Show); } else { MyGlobal.GoSDK.ProfileList.Clear(); } } }
/// <summary> /// 显示对应帧数的图片或轮廓 从1 开始 /// </summary> /// <param name="num"> 对应帧数 从1 开始</param> void ShowImage(int num) { try { if (HeightImage.Count > 0) { sw.hwnd[1].HobjectToHimage(HeightImage[num - 1]); } if (IntensityImage.Count > 0) { sw.hwnd[2].HobjectToHimage(IntensityImage[num - 1]); } if (MyGlobal.GoSDK.ProfileList.Count > 0) { SagensSdk.Profile profile = MyGlobal.GoSDK.ProfileList[num - 1]; ShowSigleProfile(profile); } } catch (Exception) { throw; } }