Class InterleavedS32

All Implemented Interfaces:
Serializable, Cloneable

public class InterleavedS32 extends InterleavedInteger<InterleavedS32>

ImageInterleaved for data of type int.

See Also:
  • Field Details

    • data

      public int[] data
  • Constructor Details

    • InterleavedS32

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

      public InterleavedS32()
  • 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<InterleavedS32>
    • getDataType

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

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

      public void unsafe_set(int x, int y, int... value)
      Sets the pixel's value for all the bands using an array.
      Specified by:
      unsafe_set in class InterleavedInteger<InterleavedS32>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      value - The pixel's new value for each band.
    • 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<InterleavedS32>
      Parameters:
      x - pixel coordinate.
      y - pixel coordinate.
      band - which color band in the pixel
      Returns:
      an intensity value.
    • getArrayValue

      protected int getArrayValue(int index)
      Specified by:
      getArrayValue in class InterleavedInteger<InterleavedS32>
    • setBand

      public void setBand(int x, int y, int band, int value)
      Returns the value of the specified band in the specified pixel.
      Specified by:
      setBand in class InterleavedInteger<InterleavedS32>
      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<InterleavedS32>
      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<InterleavedS32>
      Returns:
      data array;
    • getPrimitiveDataType

      protected Class getPrimitiveDataType()
      Specified by:
      getPrimitiveDataType in class ImageInterleaved<InterleavedS32>
    • _setData

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

      public InterleavedS32 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<InterleavedS32>
      Parameters:
      imgWidth - Width of the new image
      imgHeight - height of the new image
      Returns:
      new image