Class FeatureCostAssigner
Object
org.anchoranalysis.bean.AnchorBean<AnnotationComparisonAssigner<T>>
org.anchoranalysis.plugin.annotation.bean.comparison.assigner.AnnotationComparisonAssigner<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>
org.anchoranalysis.plugin.annotation.bean.comparison.assigner.FeatureCostAssigner
public class FeatureCostAssigner extends AnnotationComparisonAssigner<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>
Assigns an objects from one set of objects to another based upon a cost (degree of overlap).
This is a form of bipartite matching.
The following outputs are produced:
| Output Name | Default? | Description |
|---|---|---|
| "costMatrix" | no | a CSV file showing a matrix of costs calculated for the objects. |
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description FeatureCostAssigner() -
Method Summary
Modifier and Type Method Description voidaddDefaultOutputs(org.anchoranalysis.io.output.enabled.OutputEnabledMutable outputs)Adds any default outputs that should occur from the assigner.org.anchoranalysis.annotation.io.assignment.OverlappingObjectscreateAssignment(ObjectsToCompare objectsToCompare, org.anchoranalysis.image.core.dimensions.Dimensions dimensions, boolean useMIP, org.anchoranalysis.io.output.outputter.InputOutputContext context)Creates an assignment based on the objects to compare.org.anchoranalysis.image.feature.bean.evaluator.FeatureEvaluator<org.anchoranalysis.image.feature.input.FeatureInputPairObjects>getFeatureEvaluator()doublegetMaxCost()intgetNumberDecimalPlaces()ImageCounterWithStatistics<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>groupForKey(String key)Gets theImageCounterWithStatisticsfor a specific key.booleanisRemoveTouchingBorderXY()booleanmoreThanOneObject()Checks if more than one object can exist in the assignment.voidsetFeatureEvaluator(org.anchoranalysis.image.feature.bean.evaluator.FeatureEvaluator<org.anchoranalysis.image.feature.input.FeatureInputPairObjects> featureEvaluator)voidsetMaxCost(double maxCost)voidsetNumberDecimalPlaces(int numberDecimalPlaces)voidsetRemoveTouchingBorderXY(boolean removeTouchingBorderXY)
-
Constructor Details
-
FeatureCostAssigner
public FeatureCostAssigner()
-
-
Method Details
-
createAssignment
public org.anchoranalysis.annotation.io.assignment.OverlappingObjects createAssignment(ObjectsToCompare objectsToCompare, org.anchoranalysis.image.core.dimensions.Dimensions dimensions, boolean useMIP, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.core.exception.CreateExceptionDescription copied from class:AnnotationComparisonAssignerCreates an assignment based on the objects to compare.- Specified by:
createAssignmentin classAnnotationComparisonAssigner<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>- Parameters:
objectsToCompare- the objects to compare.dimensions- the dimensions of the image.useMIP- whether to use Maximum Intensity Projection.context- the input-output context.- Returns:
- the created assignment.
- Throws:
org.anchoranalysis.core.exception.CreateException- if the assignment cannot be created.
-
groupForKey
public ImageCounterWithStatistics<org.anchoranalysis.annotation.io.assignment.OverlappingObjects> groupForKey(String key)Description copied from class:AnnotationComparisonAssignerGets theImageCounterWithStatisticsfor a specific key.- Specified by:
groupForKeyin classAnnotationComparisonAssigner<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>- Parameters:
key- the key to get the group for.- Returns:
- the
ImageCounterWithStatisticsfor the given key.
-
moreThanOneObject
public boolean moreThanOneObject()Description copied from class:AnnotationComparisonAssignerChecks if more than one object can exist in the assignment.- Specified by:
moreThanOneObjectin classAnnotationComparisonAssigner<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>- Returns:
- true if more than one object can exist, false otherwise.
-
addDefaultOutputs
public void addDefaultOutputs(org.anchoranalysis.io.output.enabled.OutputEnabledMutable outputs)Description copied from class:AnnotationComparisonAssignerAdds any default outputs that should occur from the assigner.- Specified by:
addDefaultOutputsin classAnnotationComparisonAssigner<org.anchoranalysis.annotation.io.assignment.OverlappingObjects>- Parameters:
outputs- theOutputEnabledMutableto add the default outputs to.
-
getFeatureEvaluator
public org.anchoranalysis.image.feature.bean.evaluator.FeatureEvaluator<org.anchoranalysis.image.feature.input.FeatureInputPairObjects> getFeatureEvaluator() -
setFeatureEvaluator
public void setFeatureEvaluator(org.anchoranalysis.image.feature.bean.evaluator.FeatureEvaluator<org.anchoranalysis.image.feature.input.FeatureInputPairObjects> featureEvaluator) -
getMaxCost
public double getMaxCost() -
setMaxCost
public void setMaxCost(double maxCost) -
getNumberDecimalPlaces
public int getNumberDecimalPlaces() -
setNumberDecimalPlaces
public void setNumberDecimalPlaces(int numberDecimalPlaces) -
isRemoveTouchingBorderXY
public boolean isRemoveTouchingBorderXY() -
setRemoveTouchingBorderXY
public void setRemoveTouchingBorderXY(boolean removeTouchingBorderXY)
-