Class ImageAssignLabel<T>

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,​S>>
org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
org.anchoranalysis.plugin.image.task.bean.labeller.ImageAssignLabel<T>
Type Parameters:
T - type of initialization associated with the filter.

public class ImageAssignLabel<T>
extends org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
Assigns a label to each image and copies into subdirectories for each label, and creates a labelling CSV.

The following outputs are produced:

Output NameDefault?Description
"images"yesa directory where copies of input images are placed in subdirectories corresponding to their label.
"mapping"yesa single CSV file where each row is an image-label correspondence.
inherited from Task
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    ImageAssignLabel()  
  • Method Summary

    Modifier and Type Method Description
    void afterAllJobsAreExecuted​(SharedStateFilteredImageOutput<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)  
    SharedStateFilteredImageOutput<T> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<org.anchoranalysis.image.io.stack.input.ProvidesStackInput> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters)  
    org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()  
    void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>> input)  
    ImageLabeller<T> getImageLabeller()
    Maps a label to an image
    org.anchoranalysis.image.bean.provider.stack.StackProvider getOutputStackProvider()
    If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.
    boolean hasVeryQuickPerInputExecution()  
    org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()  
    void setImageLabeller​(ImageLabeller<T> imageLabeller)
    Maps a label to an image
    void setOutputStackProvider​(org.anchoranalysis.image.bean.provider.stack.StackProvider outputStackProvider)
    If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.

    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 SharedStateFilteredImageOutput<T> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<org.anchoranalysis.image.io.stack.input.ProvidesStackInput> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      beforeAnyJobIsExecuted in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • defaultOutputs

      public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()
      Overrides:
      defaultOutputs in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
    • inputTypesExpected

      public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()
      Specified by:
      inputTypesExpected in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
    • doJobOnInput

      public void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>> input) throws org.anchoranalysis.experiment.JobExecutionException
      Specified by:
      doJobOnInput in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
      Throws:
      org.anchoranalysis.experiment.JobExecutionException
    • hasVeryQuickPerInputExecution

      public boolean hasVeryQuickPerInputExecution()
      Specified by:
      hasVeryQuickPerInputExecution in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
    • afterAllJobsAreExecuted

      public void afterAllJobsAreExecuted​(SharedStateFilteredImageOutput<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      afterAllJobsAreExecuted in class org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,​SharedStateFilteredImageOutput<T>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • getImageLabeller

      public ImageLabeller<T> getImageLabeller()
      Maps a label to an image
    • setImageLabeller

      public void setImageLabeller​(ImageLabeller<T> imageLabeller)
      Maps a label to an image
    • getOutputStackProvider

      public org.anchoranalysis.image.bean.provider.stack.StackProvider getOutputStackProvider()
      If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.
    • setOutputStackProvider

      public void setOutputStackProvider​(org.anchoranalysis.image.bean.provider.stack.StackProvider outputStackProvider)
      If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.