Class AnnotatorStrategy

Object
org.anchoranalysis.bean.AnchorBean<AnnotatorStrategy>
org.anchoranalysis.annotation.io.bean.AnnotatorStrategy

public abstract class AnnotatorStrategy
extends org.anchoranalysis.bean.AnchorBean<AnnotatorStrategy>
How an input is associated with annotations on the file-system, and how this is presented visually.

This class gives instructions on how to present the annotations process visually.

Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • pathFor

      public abstract Path pathFor​(ProvidesStackInput input) throws org.anchoranalysis.core.exception.OperationFailedException
      The path to where an annotation file for a particular input would be located.

      If the annotation is stored on multiple files, this refers to the principle file that must be unique.

      Parameters:
      input - the input to find an annotation file for.
      Returns:
      the path to where the annotation would be expected to be.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if the path cannot be successfully determined.
    • annotationLabelFor

      public abstract Optional<String> annotationLabelFor​(ProvidesStackInput input, org.anchoranalysis.core.time.OperationContext context) throws org.anchoranalysis.core.exception.OperationFailedException
      A human-friendly textual description of the annotation, or Optional.empty() if no label is available.
      Parameters:
      input - the input to find an annotation label for.
      context - TODO
      Returns:
      the label, if available.
      Throws:
      org.anchoranalysis.core.exception.OperationFailedException - if a label cannot be successfully determined.
    • weightWidthDescription

      public abstract int weightWidthDescription()
      The degree as to how lengthy the labels from annotationLabelFor(ProvidesStackInput, OperationContext) can be.

      The higher the number, the lengthier annotationLabelFor(ProvidesStackInput, OperationContext) can be.

      Returns:
      the weight.
    • getBackground

      public AnnotationBackground getBackground()
      The visual background to use while annotating.
    • setBackground

      public void setBackground​(AnnotationBackground background)
      The visual background to use while annotating.
    • getStackReader

      public StackReader getStackReader()
      How to read raster Stacks from the file-system.
    • setStackReader

      public void setStackReader​(StackReader stackReader)
      How to read raster Stacks from the file-system.