Class InterleavedInteger<T extends InterleavedInteger<T>>

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
InterleavedI16, InterleavedI8, InterleavedS32

public abstract class InterleavedInteger<T extends InterleavedInteger<T>> extends ImageInterleaved<T>
Base class for integer interleaved images.
See Also:
  • Constructor Details

    • InterleavedInteger

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

      protected InterleavedInteger()
  • Method Details

    • get

      public int[] get(int x, int y, @Nullable @org.jetbrains.annotations.Nullable int[] storage)
      Returns the pixel's value for all the bands as an array.
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      storage - If not null then the pixel's value is written here. If null a new array is created.
      Returns:
      The pixel's value.
    • unsafe_get

      public abstract void unsafe_get(int x, int y, int[] storage)
    • set

      public void set(int x, int y, int... value)
      Sets the pixel's value for all the bands using an array.
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      value - The pixel's new value for each band.
    • unsafe_set

      public abstract void unsafe_set(int x, int y, int... value)
    • getBand

      public abstract int getBand(int x, int y, int band)
      Returns the value of the specified band in the specified pixel.
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      band - which color band in the pixel
      Returns:
      an intensity value.
    • setBand

      public abstract void setBand(int x, int y, int band, int value)
      Returns the value of the specified band in the specified pixel.
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      band - which color band in the pixel
      value - The new value of the element.