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 Summary
Constructors Constructor Description AnnotatorStrategy() -
Method Summary
Modifier and Type Method Description abstract Optional<String>annotationLabelFor(ProvidesStackInput input, org.anchoranalysis.core.time.OperationContext context)A human-friendly textual description of the annotation, orOptional.empty()if no label is available.AnnotationBackgroundgetBackground()The visual background to use while annotating.StackReadergetStackReader()How to read rasterStacks from the file-system.abstract PathpathFor(ProvidesStackInput input)The path to where an annotation file for a particular input would be located.voidsetBackground(AnnotationBackground background)The visual background to use while annotating.voidsetStackReader(StackReader stackReader)How to read rasterStacks from the file-system.abstract intweightWidthDescription()The degree as to how lengthy the labels fromannotationLabelFor(ProvidesStackInput, OperationContext)can be.
-
Constructor Details
-
AnnotatorStrategy
public AnnotatorStrategy()
-
-
Method Details
-
pathFor
public abstract Path pathFor(ProvidesStackInput input) throws org.anchoranalysis.core.exception.OperationFailedExceptionThe 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.OperationFailedExceptionA human-friendly textual description of the annotation, orOptional.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 fromannotationLabelFor(ProvidesStackInput, OperationContext)can be.The higher the number, the lengthier
annotationLabelFor(ProvidesStackInput, OperationContext)can be.- Returns:
- the weight.
-
getBackground
The visual background to use while annotating. -
setBackground
The visual background to use while annotating. -
getStackReader
How to read rasterStacks from the file-system. -
setStackReader
How to read rasterStacks from the file-system.
-