Class OMEPixelParser

java.lang.Object
qupath.lib.images.servers.bioformats.OMEPixelParser

public class OMEPixelParser extends Object
This class can parse raw bytes into a BufferedImage. It is intended for use with non-RGB images; AWTImageTools can be used for RGB images.
  • Method Details

    • parse

      public BufferedImage parse(byte[][] pixels, int width, int height, int nChannels, ColorModel colorModel)
      Creates a BufferedImage from a 2-dimensional byte array.
      Parameters:
      pixels - the byte array containing the pixel values. The first dimension of the array refers to the channel and the second dimension refers to the position of the pixel
      width - the width in pixels of the image
      height - the height in pixels of the image
      nChannels - the number of channels of this image
      colorModel - the color model to use when creating the image
      Returns:
      the corresponding image