All Implemented Interfaces:
Provider<ObjectCollection>
Direct Known Subclasses:
MergePairs, MergeToIncreaseObjectFeature

public abstract class MergeWithFeature extends MergeWithOptionalDistanceConstraint
Base class for object-merging strategies that involve calculating a feature.
Author:
Owen Feehan
  • Constructor Details

    • MergeWithFeature

      public MergeWithFeature()
  • Method Details

    • createFromObjects

      public ObjectCollection createFromObjects(ObjectCollection objectsSource) throws ProvisionFailedException
      Description copied from class: ObjectCollectionProviderUnary
      Creates a ObjectCollection given the entity provided by the delegate.
      Specified by:
      createFromObjects in class ObjectCollectionProviderUnary
      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

      protected abstract PayloadCalculator createPayloadCalculator() throws OperationFailedException
      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

      protected abstract AssignPriority createPrioritizer() throws OperationFailedException
      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 the requireBBoxNeighbors condition.
    • setRequireTouching

      public void setRequireTouching(boolean requireTouching)
      Requires the object-masks to touch. More expensive to calculate than the requireBBoxNeighbors condition.