Class ImageLabelStrategy
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.annotation.io.bean.AnnotatorStrategy>
org.anchoranalysis.annotation.io.bean.AnnotatorStrategy
org.anchoranalysis.plugin.annotation.bean.strategy.SinglePathStrategy
org.anchoranalysis.plugin.annotation.bean.strategy.ImageLabelStrategy
public class ImageLabelStrategy extends SinglePathStrategy
Assigns a single label per image, as a whole.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ImageLabelStrategy() -
Method Summary
Modifier and Type Method Description Optional<String>annotationLabelFor(org.anchoranalysis.image.io.stack.input.ProvidesStackInput item, org.anchoranalysis.core.time.OperationContext context)List<AnnotationLabel>getLabels()List ofAnnotationLabels available for annotation.intgetWeightWidthDescription()The weight to use for the width of the description.GroupedAnnotationLabelsgroupedLabels()Creates aGroupedAnnotationLabelsfrom the current labels.voidsetLabels(List<AnnotationLabel> labels)List ofAnnotationLabels available for annotation.voidsetWeightWidthDescription(int weightWidthDescription)The weight to use for the width of the description.intweightWidthDescription()Methods inherited from class org.anchoranalysis.plugin.annotation.bean.strategy.SinglePathStrategy
getPathAnnotation, pathFor, setPathAnnotationMethods inherited from class org.anchoranalysis.annotation.io.bean.AnnotatorStrategy
getBackground, getStackReader, setBackground, setStackReader
-
Constructor Details
-
ImageLabelStrategy
public ImageLabelStrategy()
-
-
Method Details
-
annotationLabelFor
public Optional<String> annotationLabelFor(org.anchoranalysis.image.io.stack.input.ProvidesStackInput item, org.anchoranalysis.core.time.OperationContext context) throws org.anchoranalysis.core.exception.OperationFailedException- Specified by:
annotationLabelForin classorg.anchoranalysis.annotation.io.bean.AnnotatorStrategy- Throws:
org.anchoranalysis.core.exception.OperationFailedException
-
groupedLabels
Creates aGroupedAnnotationLabelsfrom the current labels.This is actually called twice during a typical opening of an annotation. But overhead is minor (assuming not very many labels).
- Returns:
- a new
GroupedAnnotationLabelsinstance.
-
weightWidthDescription
public int weightWidthDescription()- Specified by:
weightWidthDescriptionin classorg.anchoranalysis.annotation.io.bean.AnnotatorStrategy
-
getLabels
List ofAnnotationLabels available for annotation. -
setLabels
List ofAnnotationLabels available for annotation. -
getWeightWidthDescription
public int getWeightWidthDescription()The weight to use for the width of the description. -
setWeightWidthDescription
public void setWeightWidthDescription(int weightWidthDescription)The weight to use for the width of the description.
-