Class CompareAnnotations<T extends Assignment<ObjectMask>>
Object
AnchorBean<Task<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T>>>
- Type Parameters:
T- assignment-type.
public class CompareAnnotations<T extends Assignment<ObjectMask>>
extends Task<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T>>
Task to compare a set of annotations to a segmentation or another set of annotations.
The following outputs are produced:
| Output Name | Default? | Description |
|---|---|---|
| "byImage" | yes | a single CSV file showing summary statistics of matching for all images. |
| "byGroup"<T extends Assignment<ObjectMask>> | yes | a single CSV file showing summary statistics of matching for all groups group of images. |
| "outline" | yes | a file per image showing a colored representation of which annotations matched (or didn't) for each image. |
outputs from the AnnotationComparisonAssigner in assign | ||
outputs from Task |
- Author:
- Owen Feehan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOutput name for the CSV file containing summary statistics for all groups of images. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAllJobsAreExecuted(ComparisonSharedState<T> sharedState, InputOutputContext context) beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<AnnotationComparisonInput<ProvidesStackInput>> inputs, ParametersExperiment parameters) OutputEnabledMutablevoiddoJobOnInput(InputBound<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T>> input) The assigner used for annotation comparison.The name of the stack to use as background to the annotations.ColorSchemeThe color scheme for unpaired objects.StackDisplayerHow to convert an image to be displayed to the user.intThe maximum number of groups to split the identifier into.intThe number of levels for grouping.intHow many pixels should the outline be around objects.If non-empty, the string (a regular-expression) is used to split the file's identifier into groups.booleanInputTypesExpectedbooleanIf true, a maximum-intensity-projection is first applied to any 3D objects into a 2D plane, before comparison.booleanIf true, matched objects are replaced with solid colors.voidsetAssigner(AnnotationComparisonAssigner<T> assigner) The assigner used for annotation comparison.voidsetBackground(String background) The name of the stack to use as background to the annotations.voidsetColorsUnpaired(ColorScheme colorsUnpaired) The color scheme for unpaired objects.voidsetDisplayer(StackDisplayer displayer) How to convert an image to be displayed to the user.voidsetFlatten(boolean flatten) If true, a maximum-intensity-projection is first applied to any 3D objects into a 2D plane, before comparison.voidsetMaxSplitGroups(int maxSplitGroups) The maximum number of groups to split the identifier into.voidsetNumberLevelsGrouping(int numberLevelsGrouping) The number of levels for grouping.voidsetOutlineWidth(int outlineWidth) How many pixels should the outline be around objects.voidsetReplaceMatchesWithSolids(boolean replaceMatchesWithSolids) If true, matched objects are replaced with solid colors.voidsetSplitIdentifierRegex(String splitIdentifierRegex) If non-empty, the string (a regular-expression) is used to split the file's identifier into groups.Methods inherited from class org.anchoranalysis.experiment.bean.task.Task
executeJob, isInputCompatibleWithMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Field Details
-
OUTPUT_BY_GROUP
Output name for the CSV file containing summary statistics for all groups of images.- See Also:
-
-
Constructor Details
-
CompareAnnotations
public CompareAnnotations()
-
-
Method Details
-
beforeAnyJobIsExecuted
public ComparisonSharedState<T> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<AnnotationComparisonInput<ProvidesStackInput>> inputs, ParametersExperiment parameters) throws ExperimentExecutionException - Specified by:
beforeAnyJobIsExecutedin classTask<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T extends Assignment<ObjectMask>>>- Throws:
ExperimentExecutionException
-
doJobOnInput
public void doJobOnInput(InputBound<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T>> input) throws JobExecutionException - Specified by:
doJobOnInputin classTask<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T extends Assignment<ObjectMask>>>- Throws:
JobExecutionException
-
inputTypesExpected
public InputTypesExpected inputTypesExpected()- Specified by:
inputTypesExpectedin classTask<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T extends Assignment<ObjectMask>>>
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()- Specified by:
hasVeryQuickPerInputExecutionin classTask<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T extends Assignment<ObjectMask>>>
-
defaultOutputs
public OutputEnabledMutable defaultOutputs()- Overrides:
defaultOutputsin classTask<AnnotationComparisonInput<ProvidesStackInput>, ComparisonSharedState<T extends Assignment<ObjectMask>>>
-
getBackground
The name of the stack to use as background to the annotations. -
setBackground
The name of the stack to use as background to the annotations. -
getSplitIdentifierRegex
If non-empty, the string (a regular-expression) is used to split the file's identifier into groups. -
setSplitIdentifierRegex
If non-empty, the string (a regular-expression) is used to split the file's identifier into groups. -
getMaxSplitGroups
public int getMaxSplitGroups()The maximum number of groups to split the identifier into. -
setMaxSplitGroups
public void setMaxSplitGroups(int maxSplitGroups) The maximum number of groups to split the identifier into. -
getNumberLevelsGrouping
public int getNumberLevelsGrouping()The number of levels for grouping. -
setNumberLevelsGrouping
public void setNumberLevelsGrouping(int numberLevelsGrouping) The number of levels for grouping. -
isFlatten
public boolean isFlatten()If true, a maximum-intensity-projection is first applied to any 3D objects into a 2D plane, before comparison. -
setFlatten
public void setFlatten(boolean flatten) If true, a maximum-intensity-projection is first applied to any 3D objects into a 2D plane, before comparison. -
getOutlineWidth
public int getOutlineWidth()How many pixels should the outline be around objects. -
setOutlineWidth
public void setOutlineWidth(int outlineWidth) How many pixels should the outline be around objects. -
getAssigner
The assigner used for annotation comparison. -
setAssigner
The assigner used for annotation comparison. -
isReplaceMatchesWithSolids
public boolean isReplaceMatchesWithSolids()If true, matched objects are replaced with solid colors. -
setReplaceMatchesWithSolids
public void setReplaceMatchesWithSolids(boolean replaceMatchesWithSolids) If true, matched objects are replaced with solid colors. -
getColorsUnpaired
public ColorScheme getColorsUnpaired()The color scheme for unpaired objects. -
getDisplayer
public StackDisplayer getDisplayer()How to convert an image to be displayed to the user. -
setDisplayer
public void setDisplayer(StackDisplayer displayer) How to convert an image to be displayed to the user.
-