Class ImageLabellerStringMap<T>
Object
org.anchoranalysis.bean.AnchorBean<ImageLabeller<T>>
org.anchoranalysis.plugin.image.task.bean.labeller.ImageLabeller<ImageLabellerStringMapInitialization<T>>
org.anchoranalysis.plugin.image.task.bean.labeller.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 Constructor Description ImageLabellerStringMap() -
Method Summary
Modifier and Type Method Description Set<String>allLabels(ImageLabellerStringMapInitialization<T> initialization)Returns a set of identifiers for all groups that can be outputted by the labeller.ImageLabeller<T>getFilter()org.anchoranalysis.bean.shared.StringMapgetMap()ImageLabellerStringMapInitialization<T>initialize(Path pathForBinding)Initializes the labeller.StringlabelFor(ImageLabellerStringMapInitialization<T> sharedState, org.anchoranalysis.image.io.stack.input.ProvidesStackInput input, org.anchoranalysis.io.output.outputter.InputOutputContext context)Determines a particular group-identifier (label) for an input.voidsetFilter(ImageLabeller<T> filter)voidsetMap(org.anchoranalysis.bean.shared.StringMap map)
-
Constructor Details
-
ImageLabellerStringMap
public ImageLabellerStringMap()
-
-
Method Details
-
initialize
public ImageLabellerStringMapInitialization<T> initialize(Path pathForBinding) throws org.anchoranalysis.core.exception.InitializeExceptionDescription 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:
org.anchoranalysis.core.exception.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, org.anchoranalysis.image.io.stack.input.ProvidesStackInput input, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.core.exception.OperationFailedExceptionDescription 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:
org.anchoranalysis.core.exception.OperationFailedException- if the labelling operation fails
-
getFilter
-
setFilter
-
getMap
public org.anchoranalysis.bean.shared.StringMap getMap() -
setMap
public void setMap(org.anchoranalysis.bean.shared.StringMap map)
-