Class InterleavedI8<T extends InterleavedI8<T>>

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
InterleavedS8, InterleavedU8

public abstract class InterleavedI8<T extends InterleavedI8<T>>
extends InterleavedInteger<T>

ImageInterleaved for data of type byte.

See Also:
Serialized Form
  • Field Details

    • data

      public byte[] data
  • Constructor Details

    • InterleavedI8

      protected InterleavedI8​(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.
    • InterleavedI8

      protected InterleavedI8()
  • Method Details

    • toString_element

      public String toString_element​(int index)
      Description copied from class: ImageInterleaved
      Convert an individual data element into a string
      Specified by:
      toString_element in class ImageInterleaved<T extends InterleavedI8<T>>
    • getDataType

      public ImageDataType getDataType()
      Description copied from class: ImageInterleaved
      Returns image type information
      Specified by:
      getDataType in class ImageInterleaved<T extends InterleavedI8<T>>
      Returns:
      The type of image.
    • get

      public byte[] get​(int x, int y, @Nullable @org.jetbrains.annotations.Nullable byte[] 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.
    • set

      public void set​(int x, int y, byte... 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.
    • setBand

      public void setBand​(int x, int y, int band, byte 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.
    • unsafe_set

      public void unsafe_set​(int x, int y, int... value)
      Specified by:
      unsafe_set in class InterleavedInteger<T extends InterleavedI8<T>>
    • setBand

      public void setBand​(int x, int y, int band, int value)
      Description copied from class: InterleavedInteger
      Returns the value of the specified band in the specified pixel.
      Specified by:
      setBand in class InterleavedInteger<T extends InterleavedI8<T>>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      band - which color band in the pixel
      value - The new value of the element.
    • copyCol

      public void copyCol​(int col, int row0, int row1, int offset, Object array)
      Description copied from class: ImageBase
      Copies the column into the array.
      Specified by:
      copyCol in class ImageBase<T extends InterleavedI8<T>>
      Parameters:
      col - Which column to copy.
      row0 - First row. Inclusive.
      row1 - Last row. Exclusive.
      offset - First index in output array
      array - Output array
    • _getData

      protected Object _getData()
      Description copied from class: ImageInterleaved
      Returns the data array the image is stored in.
      Specified by:
      _getData in class ImageInterleaved<T extends InterleavedI8<T>>
      Returns:
      data array;
    • getPrimitiveDataType

      protected Class getPrimitiveDataType()
      Specified by:
      getPrimitiveDataType in class ImageInterleaved<T extends InterleavedI8<T>>
    • _setData

      protected void _setData​(Object data)
      Description copied from class: ImageInterleaved
      Sets the image's internal data array.
      Specified by:
      _setData in class ImageInterleaved<T extends InterleavedI8<T>>
      Parameters:
      data - data array