示例#1
0
        float[] GetSecondLead(string fileName)
        {
            IECGFormat format = null;

            var fmt = "SCP-ECG";

            IECGReader reader = ECGConverter.Instance.getReader(fmt);
            ECGConfig  cfg    = ECGConverter.Instance.getConfig(fmt);

            format = reader.Read(fileName, 0, cfg);

            Signals _CurrentSignal;

            format.Signals.getSignals(out _CurrentSignal);

            if (_CurrentSignal != null)
            {
                for (int i = 0, en = _CurrentSignal.NrLeads; i < en; i++)
                {
                    ECGTool.NormalizeSignal(_CurrentSignal[i].Rhythm, _CurrentSignal.RhythmSamplesPerSecond);
                }
            }

            Signals sig = _CurrentSignal.CalculateTwelveLeads();

            return(Array.ConvertAll(sig.GetLeads()[1].Rhythm, x => (float)(x)));
        }