Class ImageLabellerStringMap<T>
- Type Parameters:
T- the init-param-type of filter that is the delegate
public class ImageLabellerStringMap<T>
extends ImageLabeller<ImageLabellerStringMapInitialization<T>>
Maps one set of labels to another
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallLabels(ImageLabellerStringMapInitialization<T> initialization) Returns a set of identifiers for all groups that can be outputted by the labeller.getMap()initialize(Path pathForBinding) Initializes the labeller.labelFor(ImageLabellerStringMapInitialization<T> sharedState, ProvidesStackInput input, InputOutputContext context) Determines a particular group-identifier (label) for an input.voidsetFilter(ImageLabeller<T> filter) voidMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
ImageLabellerStringMap
public ImageLabellerStringMap()
-
-
Method Details
-
initialize
public ImageLabellerStringMapInitialization<T> initialize(Path pathForBinding) throws InitializeException Description copied from class:ImageLabellerInitializes the labeller. Should be called once before calling any other methods.- Specified by:
initializein classImageLabeller<ImageLabellerStringMapInitialization<T>>- Parameters:
pathForBinding- aPaththat 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
Description copied from class:ImageLabellerReturns a set of identifiers for all groups that can be outputted by the labeller.This method should be callable at any time.
- Specified by:
allLabelsin classImageLabeller<ImageLabellerStringMapInitialization<T>>- Parameters:
initialization- the initialized shared-state returned byImageLabeller.initialize(Path)- Returns:
- a
SetofStringlabels
-
labelFor
public String labelFor(ImageLabellerStringMapInitialization<T> sharedState, ProvidesStackInput input, InputOutputContext context) throws OperationFailedException Description copied from class:ImageLabellerDetermines a particular group-identifier (label) for an input.- Specified by:
labelForin classImageLabeller<ImageLabellerStringMapInitialization<T>>- Parameters:
sharedState- the shared-state returned byImageLabeller.initialize(Path)input- theProvidesStackInputto be labelledcontext- theInputOutputContextfor the operation- Returns:
- the label as a
String - Throws:
OperationFailedException- if the labelling operation fails
-
getFilter
-
setFilter
-
getMap
-