Class OverlayObjectMask

Object
Overlay
OverlayObjectMask

public class OverlayObjectMask extends Overlay
An implementation of Overlay that draws an ObjectMask on an image.
Author:
Owen Feehan
  • Constructor Details

    • OverlayObjectMask

      public OverlayObjectMask(ObjectMask object, int id)
      Creates with a particular ObjectMask and identifier.
      Parameters:
      object - the object-mask.
      id - the identifier.
  • Method Details

    • box

      public BoundingBox box(DrawOverlay overlayWriter, Dimensions dimensions)
      Description copied from class: Overlay
      A bounding-box around the overlay.
      Specified by:
      box in class Overlay
      Parameters:
      overlayWriter - writes the overlay on the image.
      dimensions - the dimensions of the containing-image or scene.
      Returns:
      the bounding-box.
    • createObject

      public ObjectWithProperties createObject(Dimensions dimensionsEntireImage, BinaryValuesByte binaryValuesOut) throws CreateException
      Description copied from class: Overlay
      Derives an object-mask representation of the overlay to be drawn with overlayWriter.
      Specified by:
      createObject in class Overlay
      Parameters:
      dimensionsEntireImage - how large the image is onto which the overlay will be drawn.
      binaryValuesOut - what constitutes on and off pixels in the produced object-mask.
      Returns:
      the created object-mask with associated properties.
      Throws:
      CreateException - if the object cannot be created successfully.
    • equals

      public boolean equals(Object other)
      Specified by:
      equals in class Overlay
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class Overlay
    • getObject

      public ObjectWithProperties getObject()
      The ObjectMask to draw.