Interface PathOverlay

All Known Implementing Classes:
AbstractImageOverlay, AbstractOverlay, BufferedImageOverlay, GridOverlay, HierarchyOverlay, PixelClassificationOverlay, TMAGridOverlay

public interface PathOverlay
Interface defining an overlay to paint on top of a viewer.
Author:
Pete Bankhead
  • Method Details

    • paintOverlay

      void paintOverlay(Graphics2D g2d, ImageRegion imageRegion, double downsampleFactor, ImageData<BufferedImage> imageData, boolean paintCompletely)
      Paint the overlay to a graphics object. The graphics object will have a transform applied to it, so the painting should make use of coordinates in the original image space.
      Parameters:
      g2d - Graphics2D object to which drawing should be performed. This should have any transform already applied to it.
      imageRegion - The maximum image region that should be shown.
      downsampleFactor - The downsample factor at which the overlay will be viewed. There is no need for rescaling according to this value since it has already been applied to the Graphics2D as part of its AffineTransform, however it may optionally be needed within the method e.g. to correct line thicknesses.
      imageData - the ImageData associated with this overlay. If the overlay is being displayed on a viewer, this is the ImageData open within the viewer. Not all overlays require this, and it may be null.
      paintCompletely - If true, the method is permitted to return without completely painting everything, for performance reasons.
    • getLocationString

      default String getLocationString(ImageData<BufferedImage> imageData, double x, double y, int z, int t)
      Get a location string to display when showing a specified image.

      The default implementation returns null. If subclasses override this method, they must return quickly, as it may be used to determine text to display as the mouse moves over an image.

      Parameters:
      imageData -
      x - x-coordinate, in the image space (not the viewer component space)
      y - y-coordinate, in the image space (not the viewer component space)
      z - z-index for the region currently being viewed
      t - t-index for the region currently being viewed
      Returns: