Class ConvertNamedChannels<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​S,​U extends org.anchoranalysis.io.input.InputFromManager>

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,​S>>
org.anchoranalysis.experiment.bean.task.Task<T,​SharedStateRememberConverted<U,​S>>
org.anchoranalysis.plugin.mpp.bean.convert.ConvertNamedChannels<T,​S,​U>
Type Parameters:
T - the named-channels-input we expect to receive
S - shared-state of the task
U - the named-channels-input the delegate task contains
All Implemented Interfaces:
org.anchoranalysis.experiment.io.ReplaceTask<U,​S>

public class ConvertNamedChannels<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​S,​U extends org.anchoranalysis.io.input.InputFromManager>
extends org.anchoranalysis.experiment.bean.task.Task<T,​SharedStateRememberConverted<U,​S>>
implements org.anchoranalysis.experiment.io.ReplaceTask<U,​S>
Converts NamedChannelsInput to a variety of others to match a delegate task.

The other types, to which a NamedChannelsInput will be converted are:

  1. MultiInput
  2. StackSequenceInput
  3. FileWithDirectoryInput
  4. ImageMetadataInput

Note that the presence of ReplaceTask gives special behavior to this task in the JobProcessor.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    ConvertNamedChannels()  
  • Method Summary

    Modifier and Type Method Description
    void afterAllJobsAreExecuted​(SharedStateRememberConverted<U,​S> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)  
    SharedStateRememberConverted<U,​S> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<T> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters)  
    org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()  
    void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<T,​SharedStateRememberConverted<U,​S>> inputBound)  
    org.anchoranalysis.image.io.bean.stack.reader.StackReader getDefaultStackReaderForMetadata()
    Supplies to the imageMetadataReader to use, if no other reader is specified.
    org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader getImageMetadataReader()
    How to read the ImageMetadata from the file-system.
    org.anchoranalysis.experiment.bean.task.Task<U,​S> getTask()
    The underlying task that will be called, perhaps with a different input-type.
    boolean hasVeryQuickPerInputExecution()  
    org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()  
    void replaceTask​(org.anchoranalysis.experiment.bean.task.Task<U,​S> taskToReplace)  
    void setDefaultStackReaderForMetadata​(org.anchoranalysis.image.io.bean.stack.reader.StackReader defaultStackReaderForMetadata)
    Supplies to the imageMetadataReader to use, if no other reader is specified.
    void setImageMetadataReader​(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader imageMetadataReader)
    How to read the ImageMetadata from the file-system.
    void setTask​(org.anchoranalysis.experiment.bean.task.Task<U,​S> task)
    The underlying task that will be called, perhaps with a different input-type.

    Methods inherited from class org.anchoranalysis.experiment.bean.task.Task

    executeJob, isInputCompatibleWith

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • beforeAnyJobIsExecuted

      public SharedStateRememberConverted<U,​S> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<T> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      beforeAnyJobIsExecuted in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • doJobOnInput

      public void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<T,​SharedStateRememberConverted<U,​S>> inputBound) throws org.anchoranalysis.experiment.JobExecutionException
      Specified by:
      doJobOnInput in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>>
      Throws:
      org.anchoranalysis.experiment.JobExecutionException
    • inputTypesExpected

      public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()
      Specified by:
      inputTypesExpected in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>>
    • afterAllJobsAreExecuted

      public void afterAllJobsAreExecuted​(SharedStateRememberConverted<U,​S> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      afterAllJobsAreExecuted in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • hasVeryQuickPerInputExecution

      public boolean hasVeryQuickPerInputExecution()
      Specified by:
      hasVeryQuickPerInputExecution in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>>
    • replaceTask

      public void replaceTask​(org.anchoranalysis.experiment.bean.task.Task<U,​S> taskToReplace) throws org.anchoranalysis.core.exception.OperationFailedException
      Specified by:
      replaceTask in interface org.anchoranalysis.experiment.io.ReplaceTask<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​S>
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException
    • defaultOutputs

      public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()
      Overrides:
      defaultOutputs in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.image.io.channel.input.NamedChannelsInput,​SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>>
    • getTask

      public org.anchoranalysis.experiment.bean.task.Task<U,​S> getTask()
      The underlying task that will be called, perhaps with a different input-type.
    • setTask

      public void setTask​(org.anchoranalysis.experiment.bean.task.Task<U,​S> task)
      The underlying task that will be called, perhaps with a different input-type.
    • getImageMetadataReader

      public org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader getImageMetadataReader()
      How to read the ImageMetadata from the file-system.
    • setImageMetadataReader

      public void setImageMetadataReader​(org.anchoranalysis.image.io.bean.stack.metadata.reader.ImageMetadataReader imageMetadataReader)
      How to read the ImageMetadata from the file-system.
    • getDefaultStackReaderForMetadata

      public org.anchoranalysis.image.io.bean.stack.reader.StackReader getDefaultStackReaderForMetadata()
      Supplies to the imageMetadataReader to use, if no other reader is specified.
    • setDefaultStackReaderForMetadata

      public void setDefaultStackReaderForMetadata​(org.anchoranalysis.image.io.bean.stack.reader.StackReader defaultStackReaderForMetadata)
      Supplies to the imageMetadataReader to use, if no other reader is specified.