scijava / batch-processor

A Batch Processor for SciJava
BSD 2-Clause "Simplified" License
3 stars 0 forks source link

Use plugin framework for output processing #14

Open imagejan opened 6 years ago

imagejan commented 6 years ago

Let's create an extensible way to process outputs of batch-processed modules.

Currently, module outputs will be collected and shown as a Table after batch processing:

https://github.com/scijava/batch-processor/blob/6052ea30d0044e3bd04255e0b283e379d9c1d1a6/src/main/java/org/scijava/batch/ModuleBatchProcessor.java#L116-L119

The outputFolder parameter is currently unused, but was foreseen to be used to save image outputs for each iteration when processing modules that output images.

This output processing should be provided in an extensible way by BatchOutputProcessors, so that we'd have an ImageWriterBatchOutputProcessor (likely in a different repository) that takes care of collecting outputs of a compatible type (Dataset, Img, ...) and saves them to the provided directory.

In this case, the ModuleBatchProcessor needs to be made aware of the required additional inputs (in this case, File outputFolder) and we need to dynamically add inputs to the dialog depending on the output processor that is available.

This needs a bit more thought, and I'd be happy about feedback from others.

imagesc-bot commented 7 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/saving-outputtable-after-macro-batch/94477/7