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 aObjectCollection
given the entity provided by the delegate.protected abstract PayloadCalculator
Determines the payload for any given or potential vertex.protected abstract AssignPriority
Determines the priority (and selection criteria) used to allow merges between neighbors.protected abstract boolean
Checks if the payload is considered in making decisions.boolean
Requires for any potential merge that the bounding-boxes of the two objects must intersect or touch.boolean
Requires the object-masks to touch.void
setRequireBBoxNeighbors
(boolean requireBBoxNeighbors) Requires for any potential merge that the bounding-boxes of the two objects must intersect or touch.void
setRequireTouching
(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, 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
-
MergeWithFeature
public MergeWithFeature()
-
-
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.
-
createPayloadCalculator
Determines the payload for any given or potential vertex.- Returns:
- a
PayloadCalculator
for 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
AssignPriority
for 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 therequireBBoxNeighbors
condition. -
setRequireTouching
public void setRequireTouching(boolean requireTouching) Requires the object-masks to touch. More expensive to calculate than therequireBBoxNeighbors
condition.
-