Class AbstractImageOverlay

java.lang.Object
qupath.lib.gui.viewer.overlays.AbstractOverlay
qupath.lib.gui.viewer.overlays.AbstractImageOverlay
All Implemented Interfaces:
PathOverlay
Direct Known Subclasses:
BufferedImageOverlay, PixelClassificationOverlay

public abstract class AbstractImageOverlay extends AbstractOverlay
Abstract PathOverlay with additional properties relevant when drawing BufferedImages.
Author:
Pete Bankhead
  • Property Details

  • Constructor Details

    • AbstractImageOverlay

      protected AbstractImageOverlay(OverlayOptions options)
  • Method Details

    • setInterpolation

      public void setInterpolation(ImageInterpolation interpolation)
      Set the preferred method of interpolation to use for display.
      Parameters:
      interpolation -
    • getInterpolation

      public ImageInterpolation getInterpolation()
      Get the preferred method of interpolation to use for display.
      Returns:
    • interpolationProperty

      public ObjectProperty<ImageInterpolation> interpolationProperty()
      The preferred method of interpolation to use for display.
      Returns:
      See Also:
    • setInterpolation

      protected void setInterpolation(Graphics2D g2d)
    • paintOverlay

      public void paintOverlay(Graphics2D g2d, ImageRegion imageRegion, double downsampleFactor, ImageData<BufferedImage> imageData, boolean paintCompletely)
      Description copied from interface: PathOverlay
      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.