Class MergeGreedyToIncreaseObjectFeature
- All Implemented Interfaces:
Provider<ObjectCollection>
Naive greedy merge strategy when any two neighboring objects are merged if it increases a
feature.
No guarantee exists over the priority over which merges occur, so any inferior merge could occur before a superior one, as long as both merges fulfill the conditions.
A merge occurs if the feature is increased in the merge object compared to both pre-merged
objects i.e. feature(merged) > feature(object1) and feature(merged) >
feature(object2).
- Author:
- Owen Feehan
-
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 TypeMethodDescriptioncreateFromObjects(ObjectCollection objectsSource) Creates aObjectCollectiongiven the entity provided by the delegate.booleanvoidsetFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator) voidsetReplaceWithMidpoint(boolean replaceWithMidpoint) Methods 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
-
MergeGreedyToIncreaseObjectFeature
public MergeGreedyToIncreaseObjectFeature()
-
-
Method Details
-
createFromObjects
public ObjectCollection createFromObjects(ObjectCollection objectsSource) throws ProvisionFailedException Description copied from class:ObjectCollectionProviderUnaryCreates aObjectCollectiongiven the entity provided by the delegate.- Specified by:
createFromObjectsin classObjectCollectionProviderUnary- Parameters:
objectsSource- the entity provided by the delegate.- Returns:
- the created
ObjectCollectionthat is returned by the provider. - Throws:
ProvisionFailedException- if the provider cannot complete successfully.
-
isReplaceWithMidpoint
public boolean isReplaceWithMidpoint() -
setReplaceWithMidpoint
public void setReplaceWithMidpoint(boolean replaceWithMidpoint) -
getFeatureEvaluator
-
setFeatureEvaluator
-