Class ReduceElementsGreedy

Direct Known Subclasses:
RemoveOverlappingObjects

public abstract class ReduceElementsGreedy extends ReduceElements<ObjectMask>
Reduces the number or spatial-extent of elements by favouring higher-confidence elements over lower-confidence elements.

Elements can be removed entirely, or can have other operations executed (e.g. removing overlapping voxels).

  1. Select highest-confidence proposal, remove from list, add to output.
  2. Compare this proposal with remaining proposals, and process any overlapping elements (removing or otherwise altering).
  3. If there are remaining proposals in the queue, goto Step 1.
Author:
Owen Feehan
  • Constructor Details

    • ReduceElementsGreedy

      public ReduceElementsGreedy()
  • Method Details

    • reduce

      Description copied from class: ReduceElements
      Reduce a list of elements (each with a confidence score and a label) to a smaller-list.

      It is not guaranteed that the resulting list will have fewer elements than the input list, but never more.

      Specified by:
      reduce in class ReduceElements<ObjectMask>
      Parameters:
      elements - proposed bounding-boxes with scores.
      extent - an area in which all elements must exclusively reside.
      executionTimeRecorder - records the execution time of particular operations.
      Returns:
      the outcome of the operation, indicating which elements are retained / removed / added.
    • shouldObjectsBeProcessed

      protected abstract boolean shouldObjectsBeProcessed(ObjectMask source, ObjectMask other)
      Whether to include another (possibly-overlapping with source) element in processing?
      Parameters:
      source - the element we are currently processing, for which we search for possibly overlapping element
      other - another object which we are considering to include in processing (in conjunction with source).
      Returns:
      true iff other should be included in processing.
    • processObjects

      protected abstract boolean processObjects(ObjectForReduction source, ObjectForReduction overlapping, ReduceObjectsGraph graph)
      Processes two objects.
      Parameters:
      source - the element that is being processed as the source, the object with higher confidence.
      overlapping - the element that is deemed to overlap with the sourceElement about which a decision is to be made.
      graph - the graph relating objects to each other, and determining the priority for reduction.
      Returns:
      true if the source object was altered during processing, false if it was not.