Class CLNImageView2DScaledS32

java.lang.Object
com.io7m.calino.imageview.internal.CLNImageView2DScaledS32
All Implemented Interfaces:
CLNImageView2DType

public final class CLNImageView2DScaledS32 extends Object
A signed scaled 32-bit view.
  • Constructor Details

    • CLNImageView2DScaledS32

      public CLNImageView2DScaledS32(CLNImageInfo inImageInfo, int mipLevel, byte[] inData, int inComponentCount)
      A signed scaled 32-bit view.
      Parameters:
      inImageInfo - The image info
      mipLevel - The mip level
      inData - The image data
      inComponentCount - The component count
  • Method Details

    • pixelAt

      public void pixelAt(int x, int y, double[] pixel)
      Description copied from interface: CLNImageView2DType
      Sample a pixel at the given location.
      Parameters:
      x - The x location
      y - The y location
      pixel - The output pixel
    • pixelRawAtOrdered

      public final int pixelRawAtOrdered(int x, int y, CLNByteOrder order, byte[] output)
      Description copied from interface: CLNImageView2DType
      Sample the raw data of the pixel at the given location. The returned bytes are flipped (if necessary) to match the given byte order.
      Parameters:
      x - The x location
      y - The y location
      order - The target byte order
      output - The output buffer
      Returns:
      The number of bytes written
    • componentCount

      protected final int componentCount()
    • pixelRawAtOrdered

      public final byte[] pixelRawAtOrdered(int x, int y, CLNByteOrder order)
      Description copied from interface: CLNImageView2DType
      Sample the raw data of the pixel at the given location. The returned bytes are flipped (if necessary) to match the given byte order.
      Parameters:
      x - The x location
      y - The y location
      order - The target byte order
      Returns:
      The data for one pixel
    • pixelRawAt

      public final byte[] pixelRawAt(int x, int y)
      Description copied from interface: CLNImageView2DType
      Sample the raw data of the pixel at the given location. The returned bytes are in the byte order declared in the image file, with no reordering or any reinterpretation.
      Specified by:
      pixelRawAt in interface CLNImageView2DType
      Parameters:
      x - The x location
      y - The y location
      Returns:
      The data for one pixel
    • pixelData

      protected final ByteBuffer pixelData()
    • imageInfo

      protected final CLNImageInfo imageInfo()
    • sizeX

      public final int sizeX()
      Specified by:
      sizeX in interface CLNImageView2DType
      Returns:
      The size of the view on the X axis
    • sizeY

      public final int sizeY()
      Specified by:
      sizeY in interface CLNImageView2DType
      Returns:
      The size of the view on the Y axis
    • pixelRawAt

      public final int pixelRawAt(int x, int y, byte[] output)
      Description copied from interface: CLNImageView2DType
      Sample the raw data of the pixel at the given location. The returned bytes are in the byte order declared in the image file, with no reordering or any reinterpretation.
      Specified by:
      pixelRawAt in interface CLNImageView2DType
      Parameters:
      x - The x location
      y - The y location
      output - The output buffer
      Returns:
      The number of bytes written
    • copyTo

      public final void copyTo(MemorySegment segment, CLNByteOrder byteOrder)
      Description copied from interface: CLNImageView2DType
      Copy this image data to the given memory segment.
      Specified by:
      copyTo in interface CLNImageView2DType
      Parameters:
      segment - The memory segment
      byteOrder - The byte order to which to transform the data