public void ShowTestResult(TextBlock b, string Name, AbstractTestChart wb) { List <IParameter> pl; pl = ParameterList.Where(v => v.Name == Name).ToList(); if ((pl != null) && pl.Count > 0) { string tv = "No Value"; if (wb == null) { tv = pl.Average(v => v.Value).ToString(); } else { List <IParameter> tpl = pl.Where(v => v.TestChart == wb).ToList(); if ((tpl != null) && (tpl.Count > 0)) { tv = tpl.Average(v => v.Value).ToString(); } } b.Text = tv + pl[0].Dimension; b.SetValue(ToolTipService.ToolTipProperty, Name + ":" + tv + pl[0].Dimension + "," + pl[0].Memo + "(平均耗时:" + pl.Average(v => v.SpendTime).ToString() + ")"); //b.Tag = wb; } }
public void Begin() { if (IsTesting) { return; } BeginTime = DateTime.Now; IsTesting = true; ParameterList.Clear(); TargetWindow.TestProcessbar.Value = 0; time.Interval = TimeSpan.FromSeconds(2); time.Tick += time_Tick; //PreProcess(); TaskList.Clear(); PhotoIndex = TargetWindow.PhotoList.getPhotoIndex(TargetWindow.ChartPhoto.getPhoto()); if (ChartTestList.ContainsKey(TargetWindow.ChartPhoto.getPhoto())) { CurrentChart = ChartTestList[TargetWindow.ChartPhoto.getPhoto()]; } TaskList.Add(PreProcess); if (TargetWindow.GetTestSteps() != null) { List <ParameterTest> spl = TargetWindow.GetTestSteps(); foreach (ParameterTest pt in spl) { TaskList.Add(pt); } } pi = -1; time.Start(); }
public void Init(AbstractTestChart Chart, LChartPhoto tlc) { if (Chart.ChartName != "XMark Chart") { buttonCrop.IsEnabled = false; } lc = tlc; o = Chart; }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(textBlockLatitude, "灰阶", ab); }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(TextValue, "亮度变化", ab); }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(buttonColorTrendValue, "色彩趋向差异", ab); testHelper.ShowTestResult(buttonNoise, "噪点", ab); testHelper.ShowTestResult(buttonWhiteBalance, "白平衡误差", ab); }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(textBlock5Aberration, "国标畸变测试0.5处", ab); testHelper.ShowTestResult(textBlock9Aberration, "国标畸变测试0.9处", ab); }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(TextCenterL, "中央平均明度", ab); testHelper.ShowTestResult(textBlockDE, "曝光量误差", ab); }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(buttonRayleiResolution, "中央瑞利分辨率", ab); testHelper.ShowTestResult(buttonHMTF, "中央分辨率(水平线)", ab); testHelper.ShowTestResult(buttonVMTF, "中央分辨率(垂直线)", ab); testHelper.ShowTestResult(buttonHDispersiveness, "色散(水平线)", ab); testHelper.ShowTestResult(buttonVDispersiveness, "色散(垂直线)", ab); }
public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(TextAberration, "畸变", ab); testHelper.ShowTestResult(textBlockCenterBlackLineNum, "畸变卡中央线条数", ab); testHelper.ShowTestResult(textBlockCenterBlackLinePix, "畸变卡中央线条最大距离", ab); testHelper.ShowTestResult(textBlockTopBlackLineNum, "畸变卡顶部线条数", ab); testHelper.ShowTestResult(textBlockTopBlackLinePix, "畸变卡顶部线条最大距离", ab); testHelper.ShowTestResult(textBlockBottomBlackLineNum, "畸变卡底部线条数", ab); testHelper.ShowTestResult(textBlockBottomBlackLinePix, "畸变卡底部线条最大距离", ab); }
//public void TestFinish() //{ // //ResultPanel.Height = 25 * 11; // //IsTested = true; // //TestProject.TestHtml.Add(WriteHTML()); // time.Tick -= new EventHandler(time_Tick); // processbar.Value = 100; // IsTesting = false; // EndTime = DateTime.Now; // pi = 0; // ToolTipService.SetToolTip(processbar, "本次测试耗时(ms):" + (EndTime - BeginTime).TotalMilliseconds.ToString()); // //time.Start(); //} //public void ShowTestResult() //{ // ShowTestResult(buttonAberration, "畸变"); // ShowTestResult(buttonBrightChanges, "亮度一致性"); // ShowTestResult(buttonColorTrend, "色彩趋向差异"); // ShowTestResult(buttonHDispersiveness, "中央色散"); // ShowTestResult(buttonVDispersiveness, "边缘色散"); // ShowTestResult(buttonHEdgeResoveLines, "中央分辨率"); // ShowTestResult(buttonVEdgeResoveLines, "边缘分辨率"); // ShowTestResult(buttonLatitude, "动态范围"); // ShowTestResult(buttonNoise, "噪点"); // ShowTestResult(buttonPurplePercent, "紫边像素比例"); // ShowTestResult(buttonWaveQ, "成像一致性"); // ShowTestResult(buttonWhiteBanlance, "白平衡能力"); //} //public void ShowTestResult(Button b,string Name) //{ // List<IParameter> pl; // pl = ParameterList.Where(v => v.Name == Name).ToList(); // if ((pl != null) && pl.Count > 0) // { // b.Content = Name + pl.Average(v=>v.Value).ToString() + pl[0].Dimension; // b.SetValue(ToolTipService.ToolTipProperty, pl[0].Memo+"(平均耗时:"+pl.Average(v=>v.SpendTime).ToString()+")"); // } //} public void ShowTestResult(WriteableBitmap chartPhoto) { AbstractTestChart ab = null; if ((chartPhoto != null) && testHelper.ChartTestList.ContainsKey(chartPhoto)) { ab = testHelper.ChartTestList[chartPhoto]; } testHelper.ShowTestResult(buttonAberration, "畸变", ab); testHelper.ShowTestResult(buttonBrightChanges, "亮度一致性", ab); testHelper.ShowTestResult(buttonColorTrend, "色彩趋向差异", ab); testHelper.ShowTestResult(buttonHDispersiveness, "中央色散", ab); testHelper.ShowTestResult(buttonVDispersiveness, "边缘色散", ab); testHelper.ShowTestResult(buttonHEdgeResoveLines, "中央分辨率", ab); testHelper.ShowTestResult(buttonVEdgeResoveLines, "边缘分辨率", ab); testHelper.ShowTestResult(buttonLatitude, "动态范围", ab); testHelper.ShowTestResult(buttonNoise, "噪点", ab); testHelper.ShowTestResult(buttonPurplePercent, "紫边像素比例", ab); testHelper.ShowTestResult(buttonWaveQ, "成像一致性", ab); testHelper.ShowTestResult(buttonWhiteBanlance, "白平衡能力", ab); }
void ProcAdd(WriteableBitmap b) { AbstractTestChart xt = TargetWindow.getChartTest(b); ChartTestList.Add(b, xt); }
public void MoveToNextPhoto() { PhotoIndex++; CurrentChart = ChartTestList[TargetWindow.PhotoList.getPhoto(PhotoIndex)]; }
public void Init(AbstractTestChart Chart, LynxPhotoViewControl tlc) { lc = tlc; o = Chart; }