Ejemplo n.º 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;
  }
Ejemplo n.º 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);
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 4
0
 /** Get the data source */
 public DataSource getSource() {
   return (DataSource) mp_data.getValue();
 }
Ejemplo n.º 5
0
 /**
  * Set the source mask
  *
  * @param ds data source
  */
 public void setSource(DataSource ds) {
   mp_data.setValue(ds);
 }
Ejemplo n.º 6
0
 /**
  * Get the first source
  *
  * @return
  */
 public Object getSource1() {
   return mp_d1.getValue();
 }
Ejemplo n.º 7
0
 /**
  * Set source2
  *
  * @param ds The data source
  */
 public void setSource2(DataSource ds) {
   mp_d2.setValue(ds);
 }
Ejemplo n.º 8
0
 /**
  * Set source1 to a constant value
  *
  * @param val The constant value
  */
 public void setSource1(double val) {
   mp_d1.setValue(new Constant(val));
 }
Ejemplo n.º 9
0
 /**
  * Set source1
  *
  * @param ds The data source
  */
 public void setSource1(DataSource ds) {
   mp_d1.setValue(ds);
 }
Ejemplo n.º 10
0
  public Sub(double data1, DataSource data2) {

    super.addParams(m_aparam);
    mp_d1.setValue(new Constant(data1));
    mp_d2.setValue(data2);
  }
Ejemplo n.º 11
0
  public Sub(DataSource data1, DataSource data2) {

    super.addParams(m_aparam);
    mp_d1.setValue(data1);
    mp_d2.setValue(data2);
  }
Ejemplo n.º 12
0
 /**
  * Get the second source
  *
  * @return
  */
 public Object getSource2() {
   return mp_d2.getValue();
 }