public void Init(ModuleParams parameters) { Params = parameters as R_Peaks_Params; Aborted = false; if (!Runnable()) _ended = true; else { _ended = false; InputWorker_basic = new Basic_Data_Worker(Params.AnalysisName); InputWorker_basic.Load(); InputData_basic = InputWorker_basic.BasicData; InputWorker = new ECG_Baseline_Data_Worker(Params.AnalysisName); InputWorker.Load(); InputData = InputWorker.Data; OutputWorker = new R_Peaks_Data_Worker(Params.AnalysisName); OutputData = new R_Peaks_Data(); _currentChannelIndex = 0; _samplesProcessed = 0; _lastRPeak = 0; _numRPeaks = 0; NumberOfChannels = InputData.SignalsFiltered.Count; _currentChannelLength = InputData.SignalsFiltered[_currentChannelIndex].Item2.Count; _currentVector = Vector<Double>.Build.Dense(_currentChannelLength); _currentVectorRRInterval = Vector<Double>.Build.Dense(_currentChannelLength); _totalVector = Vector<Double>.Build.Dense(_currentChannelLength); } }
public void Init(ModuleParams parameters) { Params = parameters as ECG_Baseline_Params; Aborted = false; if (!Runnable()) _ended = true; else { _ended = false; InputWorker = new Basic_Data_Worker(Params.AnalysisName); InputWorker.Load(); InputData = InputWorker.BasicData; OutputWorker = new ECG_Baseline_Data_Worker(Params.AnalysisName); OutputData = new ECG_Baseline_Data(); _currentChannelIndex = 0; _samplesProcessed = 0; NumberOfChannels = InputData.Signals.Count; _currentChannelLength = InputData.Signals[_currentChannelIndex].Item2.Count; //_currentVector = InputData.Signals[_currentChannelIndex].Item2.CopySubVectorTo(_currentVector,0,0, _currentChannelLength); //Vector<Double>.Build.Dense(_currentChannelLength); //InputData.Signals[_currentChannelIndex].Item2.CopySubVectorTo(_currentVector, 0, 0, _currentChannelLength); _currentVector = Vector<Double>.Build.Dense(_currentChannelLength); _temporaryVector2 = Vector<Double>.Build.Dense(_currentChannelLength); } }
public void Init(ModuleParams parameters) { Params = parameters as TestModule3_Params; Aborted = false; if (!Runnable()) _ended = true; else { _ended = false; InputWorker = new Basic_Data_Worker(Params.AnalysisName); InputWorker.Load(); InputData = InputWorker.BasicData; OutputWorker = new TestModule3_Data_Worker(Params.AnalysisName); OutputData = new TestModule3_Data(InputData.Frequency, InputData.SampleAmount); _currentChannelIndex = 0; _samplesProcessed = 0; NumberOfChannels = InputData.Signals.Count; _currentChannelLength = InputData.Signals[_currentChannelIndex].Item2.Count; _currentVector = Vector<Double>.Build.Dense(_currentChannelLength); } }
public void DisplayBasicData() { //Basic_Data_Worker worker = new Basic_Data_Worker(); //worker.Load(); //foreach (var signal in worker.BasicData.Signals) //{ // Vector<double> signalVector = signal.Item2; // LineSeries ls = new LineSeries(); // ls.Title = signal.Item1; // for(int i=0; i<signalVector.Count; i++) // { // ls.Points.Add(new DataPoint(i, signalVector[i])); // } // CurrentPlot.Series.Add(ls); //} if (first) { _ecg_Basic_Data_Worker = new Basic_Data_Worker(); _ecg_Basic_Data_Worker.Load(); first = false; var lineraYAxis = new LinearAxis(); lineraYAxis.Position = AxisPosition.Left; lineraYAxis.Minimum = -100.0; lineraYAxis.Maximum = 80.0; lineraYAxis.MajorGridlineStyle = LineStyle.Solid; lineraYAxis.MinorGridlineStyle = LineStyle.Dot; lineraYAxis.Title = "Voltage [mV]"; CurrentPlot.Axes.Add(lineraYAxis); } else { ClearPlot(); } foreach (var signal in _ecg_Basic_Data_Worker.BasicData.Signals) { Vector<double> signalVector = signal.Item2; LineSeries ls = new LineSeries(); ls.Title = signal.Item1; ls.MarkerStrokeThickness = 1; for (int i = _beginingPoint; (i <= (_beginingPoint + _windowSize) && i < signalVector.Count()); i++) { ls.Points.Add(new DataPoint(i, signalVector[i])); } CurrentPlot.Series.Add(ls); } RefreshPlot(); }