Пример #1
0
  /** @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;
  }
Пример #2
0
  public Mask(DataSource source, double threshold, double thickness) {

    super.addParams(m_aparam);
    mp_data.setValue(source);
    mp_threshold.setValue(threshold);
    mp_thickness.setValue(thickness);
  }
Пример #3
0
  /** @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;
  }
Пример #4
0
 /** Get the data source */
 public DataSource getSource() {
   return (DataSource) mp_data.getValue();
 }
Пример #5
0
 /**
  * Set the source mask
  *
  * @param ds data source
  */
 public void setSource(DataSource ds) {
   mp_data.setValue(ds);
 }
Пример #6
0
 /**
  * Get the first source
  *
  * @return
  */
 public Object getSource1() {
   return mp_d1.getValue();
 }
Пример #7
0
 /**
  * Set source2
  *
  * @param ds The data source
  */
 public void setSource2(DataSource ds) {
   mp_d2.setValue(ds);
 }
Пример #8
0
 /**
  * Set source1 to a constant value
  *
  * @param val The constant value
  */
 public void setSource1(double val) {
   mp_d1.setValue(new Constant(val));
 }
Пример #9
0
 /**
  * Set source1
  *
  * @param ds The data source
  */
 public void setSource1(DataSource ds) {
   mp_d1.setValue(ds);
 }
Пример #10
0
  public Sub(double data1, DataSource data2) {

    super.addParams(m_aparam);
    mp_d1.setValue(new Constant(data1));
    mp_d2.setValue(data2);
  }
Пример #11
0
  public Sub(DataSource data1, DataSource data2) {

    super.addParams(m_aparam);
    mp_d1.setValue(data1);
    mp_d2.setValue(data2);
  }
Пример #12
0
 /**
  * Get the second source
  *
  * @return
  */
 public Object getSource2() {
   return mp_d2.getValue();
 }