Пример #1
0
        public override SGHalfPeriod[] GetHalfPeriods(SOPPars _sop)
        {
            SGPars pars            = ParAll.ST.Defect.Cross.SolidGroup.sgPars;
            List <SGHalfPeriod> L  = new List <SGHalfPeriod>();
            IEnumerator         ie = SGCalc.Calc(
                SqlBoolean.False,
                new SqlString(GetImg()),
                GetThech(),
                new SqlInt32(pars.HalfPeriod),
                new SqlInt32(pars.HalfPeriodDif),
                new SqlBoolean(pars.FullPeriod),
                new SqlString(pars.AlgorithmPoints.ToString()),
                new SqlString(pars.ValIU.ToString()),
                new SqlInt32(pars.BorderBegin),
                new SqlInt32(pars.BorderEnd),
                _sop == null ? SqlInt32.Null : new SqlInt32(_sop.Length),
                _sop == null ? SqlInt32.Null : new SqlInt32(_sop.BeginPoint),
                _sop == null ? SqlInt32.Null : new SqlInt32(_sop.EndPoint)
                );
            int index = 0;

            while (ie.MoveNext())
            {
                SGCalc.Result result = ie.Current as SGCalc.Result;
                L.Add(new SGHalfPeriod(result.par, Convert.ToInt32(result.val), index++));
            }
            return(L.ToArray());
        }
Пример #2
0
    static public IEnumerator Calc(
        SqlBoolean _pars,
        SqlString _img,
        SqlString _stresh,
        SqlInt32 _HalfPeriod,
        SqlInt32 _HalfPeriodDif,
        SqlBoolean _FullPeriod,
        SqlString _ByU,
        SqlString _ValIU,
        SqlInt32 _BorderStart,
        SqlInt32 _BorderStop,
        SqlInt32 _SOPLenght,
        SqlInt32 _SOPStart,
        SqlInt32 _SOPStop
        )
    {
        SGCalc      Instance = new SGCalc();
        IEnumerator en       = Instance.Calc0(
            _pars,
            _img,
            _stresh,
            _HalfPeriod,
            _HalfPeriodDif,
            _FullPeriod,
            _ByU,
            _ValIU,
            _BorderStart,
            _BorderStop,
            _SOPLenght,
            _SOPStart,
            _SOPStop
            );

        while (en.MoveNext())
        {
            yield return(en.Current);
        }
        yield break;
    }