public ThresholdingProcessor() { type = ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_Count; orientation = ThresholdFilter.ThresholdingOrientation.Orientation_MostIntense; processingPanels.thresholderValueTextBox.TextChanged += new EventHandler(optionsChanged); processingPanels.thresholderOrientationComboBox.TextChanged += new EventHandler(optionsChanged); processingPanels.thresholderTypeComboBox.TextChanged += new EventHandler(optionsChanged); }
void optionsChanged(object sender, EventArgs e) { if (panel.Tag != this) { return; } if (!Double.TryParse(processingPanels.thresholderValueTextBox.Text, out threshold)) { threshold = 0; } type = (ThresholdFilter.ThresholdingBy_Type)processingPanels.thresholderTypeComboBox.SelectedIndex; orientation = (ThresholdFilter.ThresholdingOrientation)processingPanels.thresholderOrientationComboBox.SelectedIndex; OnOptionsChanged(sender, e); }
private double defaultThreshold(ThresholdFilter.ThresholdingBy_Type type) { switch (type) { default: case ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_Count: case ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_CountAfterTies: return(100); case ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_AbsoluteIntensity: case ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_FractionOfBasePeakIntensity: case ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_FractionOfTotalIntensity: return(0); case ThresholdFilter.ThresholdingBy_Type.ThresholdingBy_FractionOfTotalIntensityCutoff: return(1); } }
public ThresholdingProcessor(ProcessingMethod method) { // parse type, orientation, and threshold from method UserParam param = method.userParam("threshold"); if (param.type == "SeeMS") { threshold = (double)param.value; } param = method.userParam("type"); if (param.type == "SeeMS") { type = (ThresholdFilter.ThresholdingBy_Type)(int) param.value; } param = method.userParam("orientation"); if (param.type == "SeeMS") { orientation = (ThresholdFilter.ThresholdingOrientation)(int) param.value; } }