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 aObjectCollection
given the entity provided by the delegate.boolean
void
setFeatureEvaluator
(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator) void
setReplaceWithMidpoint
(boolean replaceWithMidpoint) Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.merge.MergeWithOptionalDistanceConstraint
getMaxDistance, isSuppressZ, maybeDistanceCondition, setMaxDistance, setSuppressZ
Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.merge.MergeBase
getDimensions, mergeMultiplex, resolutionRequired, setDimensions, unitConvertOptional
Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.WithContainerBase
containerOptional, containerRequired, getObjectsContainer, setObjectsContainer
Methods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary
get, getObjects, setObjects
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods 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:ObjectCollectionProviderUnary
Creates aObjectCollection
given the entity provided by the delegate.- Specified by:
createFromObjects
in classObjectCollectionProviderUnary
- Parameters:
objectsSource
- the entity provided by the delegate.- Returns:
- the created
ObjectCollection
that 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
-