Interface SingleChannelDisplayInfo

All Superinterfaces:
ChannelDisplayInfo
All Known Implementing Classes:
DirectServerChannelInfo

public interface SingleChannelDisplayInfo extends ChannelDisplayInfo
ChannelDisplayInfo that determines colors based upon a single value for each pixel. This is able to supply the underlying values as a float array.
Author:
Pete Bankhead
  • Method Details

    • getValue

      float getValue(BufferedImage img, int x, int y)
      Extract the value for a single pixel of an image.
      Parameters:
      img - the image
      x - x-coordinate of the pixel
      y - y-coordinate of the pixel
      Returns:
      the value of the pixel
    • getValues

      float[] getValues(BufferedImage img, int x, int y, int w, int h, float[] array)
      Extract values for a square of pixels from an image.
      Parameters:
      img - the image
      x - x-coordinate of the top left corner of the region to extract
      y - y-coordinate of the top left corner of the region to extract
      w - width of the region to extract
      h - height of the region to extract
      array - optional array that may be used to store the output values
      Returns:
      array of values
    • isMutable

      boolean isMutable()
      Check if getValue(BufferedImage, int, int) returns fixed values, or if they are dependent on other properties of the ImageData.

      For example, a transform based on color deconvolution should be flagged as mutable because stain vectors change, while a simple channel separation is not considered mutable (since the pixel values for the underlying image remain constant in QuPath).

      Returns: