private void radioButton_spikesReferencingCommonAverage_CheckedChanged(object sender, EventArgs e) { lock (this) { if (radioButton_spikesReferencingCommonAverage.Checked) { referncer = new Filters.CommonAverageReferencer(spikeBufferLength); } } }
//Reset dig referencer private void resetReferencers() { if (radioButton_spikeReferencingNone.Checked) { referncer = null; } else if (radioButton_spikesReferencingCommonAverage.Checked) { referncer = new Filters.CommonAverageReferencer(spikeBufferLength); } else if (radioButton_spikesReferencingCommonMedian.Checked) { referncer = new Filters.CommonMedianReferencer(spikeBufferLength, numChannels); } else if (radioButton_spikesReferencingCommonMedianLocal.Checked) { int channelsPerGroup = Convert.ToInt32(numericUpDown_CommonMedianLocalReferencingChannelsPerGroup.Value); referncer = new Filters.CommonMedianLocalReferencer(spikeBufferLength, channelsPerGroup, numChannels / channelsPerGroup); } }