Class GrayI8<T extends GrayI8<T>>

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
GrayS8, GrayU8

public abstract class GrayI8<T extends GrayI8<T>> extends GrayI<T>

Base class for images with 8-bit pixels.

See Also:
  • Field Details

    • data

      public byte[] data
  • Constructor Details

    • GrayI8

      protected GrayI8(int width, int height)
      Creates a new gray scale (single band/color) image.
      Parameters:
      width - number of columns in the image.
      height - number of rows in the image.
    • GrayI8

      protected GrayI8()
    • GrayI8

      protected GrayI8(byte[][] input)
      Create a copy from the two array. input[y][x]
  • Method Details

    • set

      public void set(int x, int y, int value)
      Sets the value of the specified pixel.
      Specified by:
      set in class GrayI<T extends GrayI8<T>>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      value - The pixel's new value.
    • 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 GrayI8<T>>
      Parameters:
      col - Which column to copy.
      row0 - First row. Inclusive.
      row1 - Last row. Exclusive.
      offset - First index in output array
      array - Output array
    • unsafe_set

      public void unsafe_set(int x, int y, int value)
      Description copied from class: GrayI
      Set function which does not perform bounds checking.
      Specified by:
      unsafe_set in class GrayI<T extends GrayI8<T>>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      value - The pixel's new value.
    • _getData

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

      public void _setData(Object data)
      Description copied from class: ImageGray
      Sets the image's internal data array.
      Specified by:
      _setData in class ImageGray<T extends GrayI8<T>>
      Parameters:
      data - data array
    • getDataType

      public ImageDataType getDataType()
      Description copied from class: ImageGray
      Returns image type information
      Overrides:
      getDataType in class GrayI<T extends GrayI8<T>>
      Returns:
      The type of image.
    • getData

      public byte[] getData()
    • setData

      public void setData(byte[] data)