Class GrayS32

All Implemented Interfaces:
Serializable, Cloneable

public class GrayS32
extends GrayI<GrayS32>

Gray scale image with a pixel type of signed 32-bit integer

See Also:
Serialized Form
  • Field Details

    • data

      public int[] data
  • Constructor Details

    • GrayS32

      public GrayS32​(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.
    • GrayS32

      public GrayS32()
      Creates an image with no data declared and the width/height set to zero.
  • Method Details

    • 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<GrayS32>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      value - The pixel's new value.
    • unsafe_get

      public int unsafe_get​(int x, int y)
      Description copied from class: GrayI
      Get function which does not perform bounds checking.
      Specified by:
      unsafe_get in class GrayI<GrayS32>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      Returns:
      an intensity value.
    • set

      public void set​(int x, int y, int value)
      Sets the value of the specified pixel.
      Specified by:
      set in class GrayI<GrayS32>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      value - The pixel's new value.
    • getDataType

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

      protected Object _getData()
      Description copied from class: ImageGray
      Returns the data array the image is stored in.
      Specified by:
      _getData in class ImageGray<GrayS32>
      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<GrayS32>
      Parameters:
      data - data array
    • createNew

      public GrayS32 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<GrayS32>
      Parameters:
      imgWidth - Width of the new image
      imgHeight - height of the new image
      Returns:
      new image
    • 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<GrayS32>
      Parameters:
      col - Which column to copy.
      row0 - First row. Inclusive.
      row1 - Last row. Exclusive.
      offset - First index in output array
      array - Output array
    • getData

      public int[] getData()
    • setData

      public void setData​(int[] data)