Search in sources :

Example 1 with Weighting

use of net.sf.mzmine.util.maths.Weighting in project mzmine2 by mzmine.

the class CenterMeasureComponent method getSelectedFunction.

public CenterFunction getSelectedFunction() {
    CenterMeasure measure = (CenterMeasure) comboCenterMeasure.getSelectedItem();
    Weighting trans = Weighting.NONE;
    if (comboTransform != null && comboTransform.isVisible())
        trans = (Weighting) comboTransform.getSelectedItem();
    return new CenterFunction(measure, trans);
}
Also used : CenterMeasure(net.sf.mzmine.util.maths.CenterMeasure) Weighting(net.sf.mzmine.util.maths.Weighting) CenterFunction(net.sf.mzmine.util.maths.CenterFunction)

Example 2 with Weighting

use of net.sf.mzmine.util.maths.Weighting in project mzmine2 by mzmine.

the class CenterMeasureParameter method loadValueFromXML.

@Override
public void loadValueFromXML(Element xmlElement) {
    try {
        CenterMeasure measure = CenterMeasure.valueOf(xmlElement.getAttribute("measure"));
        Weighting weighting = Weighting.valueOf(xmlElement.getAttribute("weighting"));
        value = new CenterFunction(measure, weighting);
    } catch (Exception e) {
        logger.log(Level.WARNING, "center measure cannot be loaded from xml", e);
    }
}
Also used : CenterMeasure(net.sf.mzmine.util.maths.CenterMeasure) Weighting(net.sf.mzmine.util.maths.Weighting) CenterFunction(net.sf.mzmine.util.maths.CenterFunction)

Aggregations

CenterFunction (net.sf.mzmine.util.maths.CenterFunction)2 CenterMeasure (net.sf.mzmine.util.maths.CenterMeasure)2 Weighting (net.sf.mzmine.util.maths.Weighting)2