# Interface CLNImageView2DType

All Known Implementing Classes:
  `CLNImageView2DFixedS16, CLNImageView2DFixedS32, CLNImageView2DFixedS64, CLNImageView2DFixedS8, CLNImageView2DFixedSF16, CLNImageView2DFixedSF32, CLNImageView2DFixedSF64, CLNImageView2DFixedU1555, CLNImageView2DFixedU16, CLNImageView2DFixedU32, CLNImageView2DFixedU4444, CLNImageView2DFixedU565, CLNImageView2DFixedU64, CLNImageView2DFixedU8, CLNImageView2DScaledS16, CLNImageView2DScaledS32, CLNImageView2DScaledS64, CLNImageView2DScaledS8, CLNImageView2DScaledU16, CLNImageView2DScaledU32, CLNImageView2DScaledU64, CLNImageView2DScaledU8`

public interface CLNImageView2DType

A view of a mipmap within an image.

An image view presents the illusion that a given image comprises pixels with double-precision floating point channels.

- ## Method Summary

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

- ## Method Details

  - ### copyTo

    void copyTo(MemorySegment segment, CLNByteOrder byteOrder)
    Copy this image data to the given memory segment.
    Parameters:
      `segment` - The memory segment
      `byteOrder` - The byte order to which to transform the data

  - ### sizeX

    int sizeX()
    Returns:
      The size of the view on the X axis

  - ### sizeY

    int sizeY()
    Returns:
      The size of the view on the Y axis

  - ### pixelAt

    void pixelAt(int x, int y, double[] pixel)
    Sample a pixel at the given location.
    Parameters:
      `x` - The x location
      `y` - The y location
      `pixel` - The output pixel

  - ### pixelRawAt

    byte[] pixelRawAt(int x, int y)
    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.
    Parameters:
      `x` - The x location
      `y` - The y location
    Returns:
      The data for one pixel

  - ### pixelRawAtOrdered

    byte[] pixelRawAtOrdered(int x, int y, CLNByteOrder order)
    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

    int pixelRawAt(int x, int y, byte[] output)
    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.
    Parameters:
      `x` - The x location
      `y` - The y location
      `output` - The output buffer
    Returns:
      The number of bytes written

  - ### pixelRawAtOrdered

    int pixelRawAtOrdered(int x, int y, CLNByteOrder order, byte[] output)
    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