Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        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;
            }
        }