Interface ImageRenderer

All Known Implementing Classes:
AbstractImageRenderer, ColorModelRenderer, ImageDisplay

public interface ImageRenderer
Interface for objects capable of converting a BufferedImage for rendering using Graphics2D. This typically means applying any color transforms to produce an (A)RGB image.

A timestamp and ID are supplied to help with caching.

Author:
Pete Bankhead
  • Method Details

    • applyTransforms

      BufferedImage applyTransforms(BufferedImage imgInput, BufferedImage imgOutput)
      Apply the required transforms to a BufferedImage to get the appropriate display. imgOutput should always be an RGB image (of some kind), or null if a new image should be created. imgInput should always be an image of the kind that matches the imgData, e.g. RGB/non-RGB, same number of channels, same bit-depth.
      Parameters:
      imgInput - input image
      imgOutput - output image, with the same width and height as the input; if null or the image size is inconsistent, a new RGB image should be created
      Returns:
      imgOutput, or a new RGB image created for the output
    • getLastChangeTimestamp

      long getLastChangeTimestamp()
      Timestamp of the last change (probably in milliseconds).

      This can be used to identify when the status has changed.

      Returns:
    • getUniqueID

      String getUniqueID()
      Get a unique key, which will be used for caching.

      The only requirement is that the key is unique for the ImageRenderer in its current state. It is suggested to base it on the full class name, a counter for instances of this class, and a timestamp derived from the last change.

      Returns: