Class CompareAnnotations<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,S>>
org.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T>>
org.anchoranalysis.plugin.annotation.bean.comparison.CompareAnnotations<T>
- Type Parameters:
T- assignment-type.
public class CompareAnnotations<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>> extends org.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.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" | 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
Fields Modifier and Type Field Description static StringOUTPUT_BY_GROUPOutput name for the CSV file containing summary statistics for all groups of images. -
Constructor Summary
Constructors Constructor Description CompareAnnotations() -
Method Summary
Modifier and Type Method Description voidafterAllJobsAreExecuted(ComparisonSharedState<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)ComparisonSharedState<T>beforeAnyJobIsExecuted(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<AnnotationComparisonInput<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<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T>> input)AnnotationComparisonAssigner<T>getAssigner()The assigner used for annotation comparison.StringgetBackground()The name of the stack to use as background to the annotations.org.anchoranalysis.bean.shared.color.scheme.ColorSchemegetColorsUnpaired()The color scheme for unpaired objects.org.anchoranalysis.image.bean.displayer.StackDisplayergetDisplayer()How to convert an image to be displayed to the user.intgetMaxSplitGroups()The maximum number of groups to split the identifier into.intgetNumberLevelsGrouping()The number of levels for grouping.intgetOutlineWidth()How many pixels should the outline be around objects.StringgetSplitIdentifierRegex()If non-empty, the string (a regular-expression) is used to split the file's identifier into groups.booleanhasVeryQuickPerInputExecution()org.anchoranalysis.experiment.task.InputTypesExpectedinputTypesExpected()booleanisFlatten()If true, a maximum-intensity-projection is first applied to any 3D objects into a 2D plane, before comparison.booleanisReplaceMatchesWithSolids()If 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(org.anchoranalysis.bean.shared.color.scheme.ColorScheme colorsUnpaired)The color scheme for unpaired objects.voidsetDisplayer(org.anchoranalysis.image.bean.displayer.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, isInputCompatibleWith
-
Field Details
-
OUTPUT_BY_GROUP
Output name for the CSV file containing summary statistics for all groups of images.- See Also:
- Constant Field Values
-
-
Constructor Details
-
CompareAnnotations
public CompareAnnotations()
-
-
Method Details
-
beforeAnyJobIsExecuted
public ComparisonSharedState<T> beforeAnyJobIsExecuted(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<AnnotationComparisonInput<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<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>>- Throws:
org.anchoranalysis.experiment.ExperimentExecutionException
-
doJobOnInput
public void doJobOnInput(org.anchoranalysis.experiment.task.InputBound<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T>> input) throws org.anchoranalysis.experiment.JobExecutionException- Specified by:
doJobOnInputin classorg.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>>- Throws:
org.anchoranalysis.experiment.JobExecutionException
-
inputTypesExpected
public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()- Specified by:
inputTypesExpectedin classorg.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>>
-
afterAllJobsAreExecuted
public void afterAllJobsAreExecuted(ComparisonSharedState<T> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException- Specified by:
afterAllJobsAreExecutedin classorg.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>>- Throws:
org.anchoranalysis.experiment.ExperimentExecutionException
-
hasVeryQuickPerInputExecution
public boolean hasVeryQuickPerInputExecution()- Specified by:
hasVeryQuickPerInputExecutionin classorg.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.ObjectMask>>>
-
defaultOutputs
public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()- Overrides:
defaultOutputsin classorg.anchoranalysis.experiment.bean.task.Task<AnnotationComparisonInput<org.anchoranalysis.image.io.stack.input.ProvidesStackInput>,ComparisonSharedState<T extends org.anchoranalysis.annotation.io.assignment.Assignment<org.anchoranalysis.image.voxel.object.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 org.anchoranalysis.bean.shared.color.scheme.ColorScheme getColorsUnpaired()The color scheme for unpaired objects. -
setColorsUnpaired
public void setColorsUnpaired(org.anchoranalysis.bean.shared.color.scheme.ColorScheme colorsUnpaired)The color scheme for unpaired objects. -
getDisplayer
public org.anchoranalysis.image.bean.displayer.StackDisplayer getDisplayer()How to convert an image to be displayed to the user. -
setDisplayer
public void setDisplayer(org.anchoranalysis.image.bean.displayer.StackDisplayer displayer)How to convert an image to be displayed to the user.
-