Class ImageAssignLabel<T>
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,S>>
org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>
org.anchoranalysis.plugin.image.task.bean.labeller.ImageAssignLabel<T>
- Type Parameters:
T- type of initialization associated with the filter.
public class ImageAssignLabel<T> extends org.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>
Assigns a label to each image and copies into subdirectories for each label, and creates a
labelling CSV.
The following outputs are produced:
| Output Name | Default? | Description |
|---|---|---|
| "images" | yes | a directory where copies of input images are placed in subdirectories corresponding to their label. |
| "mapping" | yes | a single CSV file where each row is an image-label correspondence. |
inherited from Task |
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description ImageAssignLabel() -
Method Summary
Modifier and Type Method Description voidafterAllJobsAreExecuted(SharedStateFilteredImageOutput<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)SharedStateFilteredImageOutput<T>beforeAnyJobIsExecuted(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<org.anchoranalysis.image.io.stack.input.ProvidesStackInput> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters)org.anchoranalysis.io.output.enabled.OutputEnabledMutabledefaultOutputs()voiddoJobOnInput(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>> input)ImageLabeller<T>getImageLabeller()Maps a label to an imageorg.anchoranalysis.image.bean.provider.stack.StackProvidergetOutputStackProvider()If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.booleanhasVeryQuickPerInputExecution()org.anchoranalysis.experiment.task.InputTypesExpectedinputTypesExpected()voidsetImageLabeller(ImageLabeller<T> imageLabeller)Maps a label to an imagevoidsetOutputStackProvider(org.anchoranalysis.image.bean.provider.stack.StackProvider outputStackProvider)If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.Methods inherited from class org.anchoranalysis.experiment.bean.task.Task
executeJob, isInputCompatibleWith
-
Constructor Details
-
ImageAssignLabel
public ImageAssignLabel()
-
-
Method Details
-
beforeAnyJobIsExecuted
public SharedStateFilteredImageOutput<T> beforeAnyJobIsExecuted(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<org.anchoranalysis.image.io.stack.input.ProvidesStackInput> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters) throws org.anchoranalysis.experiment.ExperimentExecutionException- Specified by:
beforeAnyJobIsExecutedin classorg.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>- Throws:
org.anchoranalysis.experiment.ExperimentExecutionException
-
defaultOutputs
public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()- Overrides:
defaultOutputsin classorg.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>
-
inputTypesExpected
public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()- Specified by:
inputTypesExpectedin classorg.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>
-
doJobOnInput
public void doJobOnInput(org.anchoranalysis.experiment.task.InputBound<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>> input) throws org.anchoranalysis.experiment.JobExecutionException- Specified by:
doJobOnInputin classorg.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>- Throws:
org.anchoranalysis.experiment.JobExecutionException
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()- Specified by:
hasVeryQuickPerInputExecutionin classorg.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>
-
afterAllJobsAreExecuted
public void afterAllJobsAreExecuted(SharedStateFilteredImageOutput<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException- Specified by:
afterAllJobsAreExecutedin classorg.anchoranalysis.experiment.bean.task.Task<org.anchoranalysis.image.io.stack.input.ProvidesStackInput,SharedStateFilteredImageOutput<T>>- Throws:
org.anchoranalysis.experiment.ExperimentExecutionException
-
getImageLabeller
Maps a label to an image -
setImageLabeller
Maps a label to an image -
getOutputStackProvider
public org.anchoranalysis.image.bean.provider.stack.StackProvider getOutputStackProvider()If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier. -
setOutputStackProvider
public void setOutputStackProvider(org.anchoranalysis.image.bean.provider.stack.StackProvider outputStackProvider)If it's set, a stack is generated that is outputted into subdirectory corresponding to the groupIdentifier.
-