This commit is contained in:
@@ -261,66 +261,6 @@ namespace 头罩视野.Views
|
||||
}
|
||||
}
|
||||
|
||||
//private void FinishTestAndCompute()
|
||||
//{
|
||||
// if (_leftBoundaries.Count == 0 || _rightBoundaries.Count == 0)
|
||||
// {
|
||||
// // 只测了一只眼,提示用户完成另一只眼
|
||||
// //MessageBox.Show("请完成另一只眼睛的测试");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // 将左右眼边界数组插值到标准角度网格(步长 _stepAngle)
|
||||
// int targetCount = (int)(180 / _stepAngle) + 1;
|
||||
// double[] targetAngles = new double[targetCount];
|
||||
// for (int i = 0; i < targetCount; i++) targetAngles[i] = i * _stepAngle;
|
||||
|
||||
// double[] leftInterp = InterpolateAngles(_leftMeasuredAngles.ToArray(), _leftBoundaries.ToArray(), targetAngles);
|
||||
// double[] rightInterp = InterpolateAngles(_rightMeasuredAngles.ToArray(), _rightBoundaries.ToArray(), targetAngles);
|
||||
|
||||
// // 计算单眼面积(积分)
|
||||
// double leftArea = GetArea.IntegrateArea(leftInterp, _stepAngle);
|
||||
// double rightArea = GetArea.IntegrateArea(rightInterp, _stepAngle);
|
||||
// Random rand = new Random();
|
||||
// double factor = 0.98 + 0.04 * rand.NextDouble(); // 范围 0.98 ~ 1.02
|
||||
// rightArea = leftArea * factor; // 基于左眼面积产生右眼面积,但保持趋势
|
||||
// var (totalArea, biArea) = GetArea.ComputeTotalAndBinocularArea(leftInterp, rightInterp, _stepAngle);
|
||||
// System.Diagnostics.Debug.WriteLine($"左眼边界数组: {string.Join(",", _leftBoundaries)}");
|
||||
// System.Diagnostics.Debug.WriteLine($"左眼角度数组: {string.Join(",", _leftMeasuredAngles)}");
|
||||
// System.Diagnostics.Debug.WriteLine($"右眼边界数组: {string.Join(",", _rightBoundaries)}");
|
||||
// System.Diagnostics.Debug.WriteLine($"右眼角度数组: {string.Join(",", _rightMeasuredAngles)}");
|
||||
|
||||
// System.Diagnostics.Debug.WriteLine($"左眼面积: {leftArea}");
|
||||
// // 等等
|
||||
// // 更新界面
|
||||
// Dispatcher.Invoke(() =>
|
||||
// {
|
||||
// zmsyarea.Text = leftArea.ToString("F2");
|
||||
// ymsyarea.Text = rightArea.ToString("F2");
|
||||
// smsyarea.Text = biArea.ToString("F2");
|
||||
// zsyareaNum.Text = totalArea.ToString("F2");
|
||||
// xfsyarea.Text = maxBottomViewAngle.ToString("F0");
|
||||
|
||||
// if (tbTest.Content.ToString() == "空白测试")
|
||||
// {
|
||||
// GlobalData.zsymjValue = totalArea;
|
||||
// GlobalData.kbsmsyArea = biArea;
|
||||
// sybhl.Text = "100.0";
|
||||
// zsysaveSum.Text = "100.0";
|
||||
// }
|
||||
// else if (tbTest.Content.ToString() == "试样测试")
|
||||
// {
|
||||
// double totalRate = GetArea.ComputePreservation(totalArea, GlobalData.zsymjValue,
|
||||
// GetArea.GetGammaByRatio(totalArea / GlobalData.zsymjValue));
|
||||
// double biRate = GetArea.ComputePreservation(biArea, GlobalData.kbsmsyArea,
|
||||
// GetArea.GetGammaByRatio(biArea / GlobalData.kbsmsyArea));
|
||||
// sybhl.Text = biRate.ToString("F2");
|
||||
// zsysaveSum.Text = totalRate.ToString("F2");
|
||||
// }
|
||||
// });
|
||||
|
||||
// ShowAreaData(); // 保存记录
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user