Class MergePairs
- All Implemented Interfaces:
Provider<ObjectCollection>
Merges objects if a pair feature value satisfies a condition.
The pair feature is calculated on all combinations of any two neighboring objects (but only once for each pair, unidirectionally).
The merges occur in order of the maximum increase offered (if the value exceeds the threshold), and the algorithm recursively merge until all possible merges are complete.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.anchoranalysis.plugin.image.bean.object.provider.merge.MergeBase
MergeBase.MergeObjects -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PayloadCalculatorDetermines the payload for any given or potential vertex.protected AssignPriorityDetermines the priority (and selection criteria) used to allow merges between neighbors.Allows merge only if the feature-value satisfies a relation to this thresholdRelation to thresholdprotected booleanChecks if the payload is considered in making decisions.voidsetFeatureEvaluatorMerge(FeatureEvaluator<FeatureInputPairObjects> featureEvaluatorMerge) voidsetFeatureEvaluatorThreshold(FeatureEvaluator<FeatureInputNull> featureEvaluatorThreshold) Allows merge only if the feature-value satisfies a relation to this thresholdvoidsetRelation(RelationBean relation) Relation to thresholdMethods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.merge.MergeWithFeature
createFromObjects, isRequireBBoxNeighbors, isRequireTouching, setRequireBBoxNeighbors, setRequireTouchingMethods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.merge.MergeWithOptionalDistanceConstraint
getMaxDistance, isSuppressZ, maybeDistanceCondition, setMaxDistance, setSuppressZMethods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.merge.MergeBase
getDimensions, mergeMultiplex, resolutionRequired, setDimensions, unitConvertOptionalMethods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.WithContainerBase
containerOptional, containerRequired, getObjectsContainer, setObjectsContainerMethods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary
get, getObjects, setObjectsMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
MergePairs
public MergePairs()
-
-
Method Details
-
createPayloadCalculator
Description copied from class:MergeWithFeatureDetermines the payload for any given or potential vertex.- Specified by:
createPayloadCalculatorin classMergeWithFeature- Returns:
- a
PayloadCalculatorfor determining vertex payloads
-
createPrioritizer
Description copied from class:MergeWithFeatureDetermines the priority (and selection criteria) used to allow merges between neighbors.- Specified by:
createPrioritizerin classMergeWithFeature- Returns:
- an
AssignPriorityfor determining merge priorities - Throws:
OperationFailedException- if the prioritizer cannot be created
-
isPlayloadUsed
protected boolean isPlayloadUsed()Description copied from class:MergeWithFeatureChecks if the payload is considered in making decisions.- Specified by:
isPlayloadUsedin classMergeWithFeature- Returns:
- true if the payload is used, false if the payload of nodes is irrelevant
-
getFeatureEvaluatorThreshold
Allows merge only if the feature-value satisfies a relation to this threshold -
setFeatureEvaluatorThreshold
public void setFeatureEvaluatorThreshold(FeatureEvaluator<FeatureInputNull> featureEvaluatorThreshold) Allows merge only if the feature-value satisfies a relation to this threshold -
getRelation
Relation to threshold -
getFeatureEvaluatorMerge
-
setFeatureEvaluatorMerge
public void setFeatureEvaluatorMerge(FeatureEvaluator<FeatureInputPairObjects> featureEvaluatorMerge)
-