# Class CLNImageView2DFixedS16

java.lang.Object
com.io7m.calino.imageview.internal.CLNImageView2DFixedS16

All Implemented Interfaces:
  `CLNImageView2DType`

public final class CLNImageView2DFixedS16 extends Object
A signed fixed-point 16-bit view.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CLNImageView2DFixedS16(CLNImageInfo inImageInfo, int mipLevel, byte[] inData, int inComponentCount)`
  A signed fixed-point 16-bit view.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected final int`
  `componentCount()`
  `final void`
  `copyTo(MemorySegment segment, CLNByteOrder byteOrder)`
  Copy this image data to the given memory segment.
  `protected final CLNImageInfo`
  `imageInfo()`
  `void`
  `pixelAt(int x, int y, double[] pixel)`
  Sample a pixel at the given location.
  `protected final ByteBuffer`
  `pixelData()`
  `final byte[]`
  `pixelRawAt(int x, int y)`
  Sample the raw data of the pixel at the given location.
  `final int`
  `pixelRawAt(int x, int y, byte[] output)`
  Sample the raw data of the pixel at the given location.
  `final byte[]`
  `pixelRawAtOrdered(int x, int y, CLNByteOrder order)`
  Sample the raw data of the pixel at the given location.
  `final int`
  `pixelRawAtOrdered(int x, int y, CLNByteOrder order, byte[] output)`
  Sample the raw data of the pixel at the given location.
  `final int`
  `sizeX()`
  `final int`
  `sizeY()`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CLNImageView2DFixedS16

    public CLNImageView2DFixedS16(CLNImageInfo inImageInfo, int mipLevel, byte[] inData, int inComponentCount)
    A signed fixed-point 16-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

  - ### 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

  - ### 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

  - ### 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