Class InterleavedU8

All Implemented Interfaces:
Serializable, Cloneable

public class InterleavedU8 extends InterleavedI8<InterleavedU8>

An image where the primitive type is an unsigned byte.

See Also:
  • Constructor Details

    • InterleavedU8

      public InterleavedU8(int width, int height, int numBands)
      Creates a new image with an arbitrary number of bands/colors.
      width - number of columns in the image.
      height - number of rows in the image.
      numBands - number of bands/colors in the image.
    • InterleavedU8

      public InterleavedU8()
  • Method Details

    • getDataType

      public ImageDataType getDataType()
      Description copied from class: ImageInterleaved
      Returns image type information
      getDataType in class InterleavedI8<InterleavedU8>
      The type of image.
    • get32

      public int get32(int x, int y)
      Returns an integer formed from 4 bands. a[i]<<24 | a[i+1] << 16 | a[i+2]<<8 | a[3]
      x - column
      y - row
      32 bit integer
    • get24

      public int get24(int x, int y)
      Returns an integer formed from 3 bands. a[i] << 16 | a[i+1]<<8 | a[i+2]
      x - column
      y - row
      32 bit integer
    • set24

      public void set24(int x, int y, int value)
    • set32

      public void set32(int x, int y, int value)
    • getBand

      public int getBand(int x, int y, int band)
      Returns the value of the specified band in the specified pixel.
      Specified by:
      getBand in class InterleavedInteger<InterleavedU8>
      x - pixel coordinate.
      y - pixel coordinate.
      band - which color band in the pixel
      an intensity value.
    • unsafe_get

      public void unsafe_get(int x, int y, int[] storage)
      Specified by:
      unsafe_get in class InterleavedInteger<InterleavedU8>
    • createNew

      public InterleavedU8 createNew(int imgWidth, int imgHeight)
      Description copied from class: ImageBase
      Returns a new image. If either width or height are set to -1 then none of the class parameters set. Otherwise a new image is created with the specified dimensions which has all other parameters the same as the original matrix.
      Specified by:
      createNew in class ImageBase<InterleavedU8>
      imgWidth - Width of the new image
      imgHeight - height of the new image
      new image