Class FeatureCostAssigner
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDefaultOutputs
(OutputEnabledMutable outputs) Adds any default outputs that should occur from the assigner.createAssignment
(ObjectsToCompare objectsToCompare, Dimensions dimensions, boolean useMIP, InputOutputContext context) Creates an assignment based on the objects to compare.double
int
groupForKey
(String key) Gets theImageCounterWithStatistics
for a specific key.boolean
boolean
Checks if more than one object can exist in the assignment.void
setFeatureEvaluator
(FeatureEvaluator<FeatureInputPairObjects> featureEvaluator) void
setMaxCost
(double maxCost) void
setNumberDecimalPlaces
(int numberDecimalPlaces) void
setRemoveTouchingBorderXY
(boolean removeTouchingBorderXY) Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
FeatureCostAssigner
public FeatureCostAssigner()
-
-
Method Details
-
createAssignment
public OverlappingObjects createAssignment(ObjectsToCompare objectsToCompare, Dimensions dimensions, boolean useMIP, InputOutputContext context) throws CreateException Description copied from class:AnnotationComparisonAssigner
Creates an assignment based on the objects to compare.- Specified by:
createAssignment
in classAnnotationComparisonAssigner<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:
CreateException
- if the assignment cannot be created.
-
groupForKey
Description copied from class:AnnotationComparisonAssigner
Gets theImageCounterWithStatistics
for a specific key.- Specified by:
groupForKey
in classAnnotationComparisonAssigner<OverlappingObjects>
- Parameters:
key
- the key to get the group for.- Returns:
- the
ImageCounterWithStatistics
for the given key.
-
moreThanOneObject
public boolean moreThanOneObject()Description copied from class:AnnotationComparisonAssigner
Checks if more than one object can exist in the assignment.- Specified by:
moreThanOneObject
in classAnnotationComparisonAssigner<OverlappingObjects>
- Returns:
- true if more than one object can exist, false otherwise.
-
addDefaultOutputs
Description copied from class:AnnotationComparisonAssigner
Adds any default outputs that should occur from the assigner.- Specified by:
addDefaultOutputs
in classAnnotationComparisonAssigner<OverlappingObjects>
- Parameters:
outputs
- theOutputEnabledMutable
to add the default outputs to.
-
getFeatureEvaluator
-
setFeatureEvaluator
-
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)
-