Class MergeWithFeature
- All Implemented Interfaces:
Provider<ObjectCollection>
- Direct Known Subclasses:
MergePairs,MergeToIncreaseObjectFeature
Base class for object-merging strategies that involve calculating a feature.
- 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.protected abstract PayloadCalculatorDetermines the payload for any given or potential vertex.protected abstract AssignPriorityDetermines the priority (and selection criteria) used to allow merges between neighbors.protected abstract booleanChecks if the payload is considered in making decisions.booleanRequires for any potential merge that the bounding-boxes of the two objects must intersect or touch.booleanRequires the object-masks to touch.voidsetRequireBBoxNeighbors(boolean requireBBoxNeighbors) Requires for any potential merge that the bounding-boxes of the two objects must intersect or touch.voidsetRequireTouching(boolean requireTouching) Requires the object-masks to touch.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
-
MergeWithFeature
public MergeWithFeature()
-
-
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.
-
createPayloadCalculator
Determines the payload for any given or potential vertex.- Returns:
- a
PayloadCalculatorfor determining vertex payloads - Throws:
OperationFailedException- if the payload calculator cannot be created
-
createPrioritizer
Determines the priority (and selection criteria) used to allow merges between neighbors.- Returns:
- an
AssignPriorityfor determining merge priorities - Throws:
OperationFailedException- if the prioritizer cannot be created
-
isPlayloadUsed
protected abstract boolean isPlayloadUsed()Checks if the payload is considered in making decisions.- Returns:
- true if the payload is used, false if the payload of nodes is irrelevant
-
isRequireBBoxNeighbors
public boolean isRequireBBoxNeighbors()Requires for any potential merge that the bounding-boxes of the two objects must intersect or touch. -
setRequireBBoxNeighbors
public void setRequireBBoxNeighbors(boolean requireBBoxNeighbors) Requires for any potential merge that the bounding-boxes of the two objects must intersect or touch. -
isRequireTouching
public boolean isRequireTouching()Requires the object-masks to touch. More expensive to calculate than therequireBBoxNeighborscondition. -
setRequireTouching
public void setRequireTouching(boolean requireTouching) Requires the object-masks to touch. More expensive to calculate than therequireBBoxNeighborscondition.
-