private void OnValueTranslateSingle(ref List <double> pointValue, cyEnumPointSmooth method) { switch (method) { case cyEnumPointSmooth.GaussSmooth: { ConvolGaussKernel(ref pointValue, _gauss); OnAbsGrandit(ref pointValue); break; } case cyEnumPointSmooth.AbsGradiant: { OnAbsGrandit(ref pointValue); break; } default: { OnAbsGrandit(ref pointValue); break; } } }
public void OnSearchOneAxisPoint(ref List <double> pointValue, double threValue, cyEnumPointSmooth smooth, cyEnumPointSel method, out List <int> searchIndex) { Trace.Assert(_gauss != null); searchIndex = new List <int>(); if (pointValue.Count == 0) { return; } OnValueTranslateSingle(ref pointValue, smooth); switch (method) { case cyEnumPointSel.First: { int tIndex = OnSearchFirstPoint(pointValue, threValue); searchIndex.Add(tIndex); break; } case cyEnumPointSel.Last: { int tIndex = OnSearchLastPoint(pointValue, threValue); searchIndex.Add(tIndex); break; } case cyEnumPointSel.Best: { int tIndex = OnSearchBestPoint(pointValue, threValue); searchIndex.Add(tIndex); break; } case cyEnumPointSel.All: { int tIndex = OnSearchAllPoint(pointValue, threValue, out searchIndex); break; } default: { int tIndex = OnSearchBestPoint(pointValue, threValue); searchIndex.Add(tIndex); break; } } }