Class BinaryOutcomeImageLabeller

Object
AnchorBean<ImageLabeller<NoSharedState>>
ImageLabeller<NoSharedState>
BinaryOutcomeImageLabeller
Direct Known Subclasses:
BinaryClassifierImageLabeller, DescriptiveNameContainsImageLabeller

public abstract class BinaryOutcomeImageLabeller extends ImageLabeller<NoSharedState>
Abstract base class for image labellers that produce binary outcomes (positive or negative).
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    allLabels(NoSharedState sharedState)
    Returns a set of identifiers for all groups that can be outputted by the labeller.
    protected static String
    classificationString(boolean positive)
    Converts a boolean classification result to its string representation.
    NoSharedState
    initialize(Path pathForBinding)
    Initializes the labeller.

    Methods inherited from class org.anchoranalysis.plugin.image.task.bean.labeller.ImageLabeller

    labelFor

    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

    • BinaryOutcomeImageLabeller

      public BinaryOutcomeImageLabeller()
  • Method Details

    • initialize

      public NoSharedState initialize(Path pathForBinding) throws InitializeException
      Description copied from class: ImageLabeller
      Initializes the labeller. Should be called once before calling any other methods.
      Specified by:
      initialize in class ImageLabeller<NoSharedState>
      Parameters:
      pathForBinding - a Path that can be used by the labeller to make file path decisions
      Returns:
      the initialized shared-state of type T
      Throws:
      InitializeException - if initialization fails
    • allLabels

      public Set<String> allLabels(NoSharedState sharedState)
      Description copied from class: ImageLabeller
      Returns a set of identifiers for all groups that can be outputted by the labeller.

      This method should be callable at any time.

      Specified by:
      allLabels in class ImageLabeller<NoSharedState>
      Parameters:
      sharedState - the initialized shared-state returned by ImageLabeller.initialize(Path)
      Returns:
      a Set of String labels
    • classificationString

      protected static String classificationString(boolean positive)
      Converts a boolean classification result to its string representation.
      Parameters:
      positive - true if the classification is positive, false if negative
      Returns:
      POSITIVE if true, NEGATIVE if false