Class OMEPixelParser
java.lang.Object
qupath.lib.images.servers.bioformats.OMEPixelParser
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.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionparse
(byte[][] pixels, int width, int height, int nChannels, ColorModel colorModel) Creates aBufferedImage
from a 2-dimensional byte array.
-
Method Details
-
parse
public BufferedImage parse(byte[][] pixels, int width, int height, int nChannels, ColorModel colorModel) Creates aBufferedImage
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 pixelwidth
- the width in pixels of the imageheight
- the height in pixels of the imagenChannels
- the number of channels of this imagecolorModel
- the color model to use when creating the image- Returns:
- the corresponding image
-