Class DualMarksAnnotation<T>

Object
DualMarksAnnotation<T>
Type Parameters:
T - type of rejection-reason
All Implemented Interfaces:
Annotation, AnnotationWithMarks

public class DualMarksAnnotation<T> extends Object implements AnnotationWithMarks
An annotation that consists of two sets of marks, accepted and rejected.

It also contains a possible reason for rejecting the entire image.

Author:
Owen Feehan
  • Constructor Details

    • DualMarksAnnotation

      public DualMarksAnnotation()
  • Method Details

    • assignAccepted

      public void assignAccepted(DualMarks dualMark)
      Assigns marks with an overall accepted state.
      Parameters:
      dualMark - the marks to assign to the annotation.
    • assignPaused

      public void assignPaused(DualMarks dualMark)
      Assigns marks with an overall paused state.
      Parameters:
      dualMark - the marks to assign to the annotation.
    • assignRejected

      public void assignRejected(DualMarks dualMark, T reason)
      Assigns marks with an overall rejected state.

      The so far accepted/rejected marks are still stored in case there's a later change of mind.

      Parameters:
      dualMark - the marks to assign to the annotation.
      reason - the reason for rejection
    • marks

      public MarkCollection marks()
      Description copied from interface: AnnotationWithMarks
      The marks associated with the annotation
      Specified by:
      marks in interface AnnotationWithMarks
      Returns:
      the marks
    • scaleXY

      public void scaleXY(ScaleFactor scaleFactor) throws CheckedUnsupportedOperationException
      Scales the marks in the annotation in X and Y dimensions.
      Parameters:
      scaleFactor - how much to scale by
      Throws:
      CheckedUnsupportedOperationException - if the type of mark used in the annotation does not supported scaling.
    • region

      public RegionMembershipWithFlags region()
      Description copied from interface: AnnotationWithMarks
      The region(s) of the marks that specifies the annotation.

      As marks have multiple regions, this identifies which regions are included in the annotation.

      Specified by:
      region in interface AnnotationWithMarks
      Returns:
      the identifier
    • isAccepted

      public boolean isAccepted()
      Whether the the annotation was marked as accepted by the annotator?
    • getRejectionReason

      public T getRejectionReason()
      A reason for rejection, if the annotation was rejected by the annotator.
    • getMarksReject

      public MarkCollection getMarksReject()
      Marks covering area that should be rejected, can be null
    • getTimeAnnotationLastUpdated

      public Date getTimeAnnotationLastUpdated()
      Number of seconds since the UNIX epoch
    • isFinished

      public boolean isFinished()