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 TypeMethodDescriptionvoidcopyTo(MemorySegment segment, CLNByteOrder byteOrder) Copy this image data to the given memory segment.voidpixelAt(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.intpixelRawAt(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.intpixelRawAtOrdered(int x, int y, CLNByteOrder order, byte[] output) Sample the raw data of the pixel at the given location.intsizeX()intsizeY()
-
Method Details
-
copyTo
Copy this image data to the given memory segment.- Parameters:
segment- The memory segmentbyteOrder- 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 locationy- The y locationpixel- 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 locationy- The y location- Returns:
- The data for one pixel
-
pixelRawAtOrdered
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 locationy- The y locationorder- 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 locationy- The y locationoutput- The output buffer- Returns:
- The number of bytes written
-
pixelRawAtOrdered
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 locationy- The y locationorder- The target byte orderoutput- The output buffer- Returns:
- The number of bytes written
-