/** @noRefGuide */ public int initialize() { super.initialize(); dataSource1 = (DataSource) mp_d1.getValue(); dataSource2 = (DataSource) mp_d2.getValue(); if (dataSource1 instanceof Initializable) { ((Initializable) dataSource1).initialize(); } if (dataSource2 instanceof Initializable) { ((Initializable) dataSource2).initialize(); } return ResultCodes.RESULT_OK; }
public Mask(DataSource source, double threshold, double thickness) { super.addParams(m_aparam); mp_data.setValue(source); mp_threshold.setValue(threshold); mp_thickness.setValue(thickness); }
/** @noRefGuide */ public int initialize() { super.initialize(); m_dataSource = (DataSource) mp_data.getValue(); if (m_dataSource instanceof Initializable) { ((Initializable) m_dataSource).initialize(); } m_threshold = mp_threshold.getValue(); m_thickness2 = (mp_thickness.getValue()) / 2; return ResultCodes.RESULT_OK; }
/** Get the data source */ public DataSource getSource() { return (DataSource) mp_data.getValue(); }
/** * Set the source mask * * @param ds data source */ public void setSource(DataSource ds) { mp_data.setValue(ds); }
/** * Get the first source * * @return */ public Object getSource1() { return mp_d1.getValue(); }
/** * Set source2 * * @param ds The data source */ public void setSource2(DataSource ds) { mp_d2.setValue(ds); }
/** * Set source1 to a constant value * * @param val The constant value */ public void setSource1(double val) { mp_d1.setValue(new Constant(val)); }
/** * Set source1 * * @param ds The data source */ public void setSource1(DataSource ds) { mp_d1.setValue(ds); }
public Sub(double data1, DataSource data2) { super.addParams(m_aparam); mp_d1.setValue(new Constant(data1)); mp_d2.setValue(data2); }
public Sub(DataSource data1, DataSource data2) { super.addParams(m_aparam); mp_d1.setValue(data1); mp_d2.setValue(data2); }
/** * Get the second source * * @return */ public Object getSource2() { return mp_d2.getValue(); }