Interface Processor


public interface Processor
Processors manipulate images before they are added to a Datastore. They are arranged into a sequence by a Pipeline.
  • Method Details

    • processSummaryMetadata

      default SummaryMetadata processSummaryMetadata(SummaryMetadata source)
      Update the SummaryMetadata of the Datastore that images will ultimately be stored in. This method will be called at most once, prior to any images being processed, and is the Processor's only chance to log what manner of changes it expects to make to the data. The default implementation of this method returns the passed-in SummaryMetadata unmodified.
      Parameters:
      source - Source SummaryMetadata, as generated from the input to this Processor.
      Returns:
      New SummaryMetadata, modified from the source by the Processor.
    • processImage

      void processImage(Image image, ProcessorContext context)
      Process an Image. Instead of returning a result Image, the Image should be "handed" to the provided ProcessorContext using its outputImage() method. You are not required to output an Image every time this method is called (for example if you want to do frame-averaging or stack projections). However, it is not legal to output Images outside of this function call (e.g. via thread-based systems).
      Parameters:
      image - input Image
      context - ProcessorContext to be used to hand the processed image to
    • cleanup

      default void cleanup(ProcessorContext context)
      Clean up when processing is finished. At this time no more images are going to be sent to the processImage method. The ProcessorContext is made available in case any final images need to be generated. If the Processor creates any resources external to it (like displays or datastores) then they should be cleaned up at this time.
      Parameters:
      context - ProcessorContext that can be used to hand images to