Class ParallelTileObject

All Implemented Interfaces:
Externalizable, Serializable, TemporaryObject

public class ParallelTileObject extends PathTileObject implements TemporaryObject
A temporary object, used during parallel processing to represent a tile currently being used for object detection.

ParallelTileObjects maintain knowledge of adjacent tiles, and are thereby able to resolve overlaps after detection is complete (here, based on keeping the object with the larger area).

Author:
Pete Bankhead
See Also:
  • Method Details

    • suggestNeighbor

      public boolean suggestNeighbor(ParallelTileObject pto)
      Register a neighboring tile, if it intersects with the bounds of this one
      Parameters:
      pto -
      Returns:
    • updateStatus

      public void updateStatus(ParallelTileObject.Status status)
      Notify the object if it is currently being processed. This is used to update how it is displayed (here implemented using a classification).
      Parameters:
      status -
    • getStatus

      public ParallelTileObject.Status getStatus()
      Get the current status (pending, processing or done).
      Returns:
    • isProcessing

      public boolean isProcessing()
      Returns true if setIsProcessing(true) has recently been called.
      Returns:
    • isComplete

      public boolean isComplete()
      Returns true if setComplete() has been called.
      Returns:
    • setComplete

      public void setComplete(boolean wasCancelled)
      Notify the tile that its processing is done. This both changes its display color, and triggers a check to see if overlaps with detections made in adjacent tiles can be resolved.
      Parameters:
      wasCancelled -
    • resolveOverlaps

      public void resolveOverlaps()
      Request that the tile object attempts to resolve overlaps with its neighboring tiles.