示例#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);
 }