public class MaskAsObject extends ComparableSource
Loads Mask to compared, converting it into an ObjectMask.
Author:
Owen Feehan
  • Constructor Details

    • MaskAsObject

      public MaskAsObject()
  • Method Details

    • loadAsObjects

      public Findable<ObjectCollection> loadAsObjects(Path reference, Dimensions dimensions, boolean debugMode, OperationContext context) throws InputReadFailedException
      Description copied from class: ComparableSource
      Loads the source of elements from the file-system and converts to a ObjectCollection.

      The location of elements on the file-system may be derived from a reference path.

      Specified by:
      loadAsObjects in class ComparableSource
      Parameters:
      reference - the source file-path used to help identify where elements are located on the file-system.
      dimensions - how large the scene is, in which elements are being compared. This is usually the same as the image-size.
      debugMode - true if debug-mode is activated, which can influence paths on the file-system.
      context - records the execution time of certain operations.
      Returns:
      the elements converted into a ObjectCollection and wrapped into a Findable element that indicates if they were successfully found on the file-system.
      Throws:
      InputReadFailedException - if the objects cannot be successfully loaded.
    • getDerivePath

      public DerivePath getDerivePath()
      Where to find the Mask to compare, as a function of the source file-path.
    • setDerivePath

      public void setDerivePath(DerivePath derivePath)
      Where to find the Mask to compare, as a function of the source file-path.
    • getStackReader

      public StackReader getStackReader()
      How to read the Mask from the file-system.
    • setStackReader

      public void setStackReader(StackReader stackReader)
      How to read the Mask from the file-system.
    • isInvert

      public boolean isInvert()
      If true the Mask is inverted before conversion into an ObjectCollection.
    • setInvert

      public void setInvert(boolean invert)
      If true the Mask is inverted before conversion into an ObjectCollection.