Пример #1
0
  @Override
  protected BufferedDataTable[] execute(
      final BufferedDataTable[] inData, final ExecutionContext exec) throws Exception {
    final BufferedDataContainer con = exec.createDataContainer(m_spec);
    final ImgPlusCellFactory imgCellFactory = new ImgPlusCellFactory(exec);
    int id = 1;
    for (final SerializableSetting<Img<T>[]> conf : m_kernelList.getObjects()) {
      for (final Img<T> img : conf.get()) {
        if (img instanceof ImgPlus<?>) {
          con.addRowToTable(
              new DefaultRow("Kernel " + id, imgCellFactory.createCell((ImgPlus<T>) img)));
        } else {
          con.addRowToTable(
              new DefaultRow("Kernel " + id, imgCellFactory.createCell(new ImgPlus<T>(img))));
        }
        id++;
      }
    }

    con.close();

    // data for the table cell view
    m_data = con.getTable();
    return new BufferedDataTable[] {m_data};
  }
Пример #2
0
 @Override
 protected void validateSettings(final NodeSettingsRO settings) throws InvalidSettingsException {
   m_kernelList.validateSettings(settings);
 }
Пример #3
0
 @Override
 protected void saveSettingsTo(final NodeSettingsWO settings) {
   m_kernelList.saveSettingsTo(settings);
 }
Пример #4
0
 @Override
 protected void loadValidatedSettingsFrom(final NodeSettingsRO settings)
     throws InvalidSettingsException {
   m_kernelList.loadSettingsFrom(settings);
 }