Class CLNImageView2DScaledS8
java.lang.Object
com.io7m.calino.imageview.internal.CLNImageView2DScaledS8
- All Implemented Interfaces:
CLNImageView2DType
A signed scaled 8-bit view.
-
Constructor Summary
ConstructorsConstructorDescriptionCLNImageView2DScaledS8(CLNImageInfo inImageInfo, int mipLevel, byte[] inData, int inComponentCount) A signed scaled 8-bit view. -
Method Summary
Modifier and TypeMethodDescriptionprotected final intfinal voidcopyTo(MemorySegment segment, CLNByteOrder byteOrder) Copy this image data to the given memory segment.protected final CLNImageInfovoidpixelAt(int x, int y, double[] pixel) Sample a pixel at the given location.protected final ByteBufferfinal byte[]pixelRawAt(int x, int y) Sample the raw data of the pixel at the given location.final intpixelRawAt(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 intpixelRawAtOrdered(int x, int y, CLNByteOrder order, byte[] output) Sample the raw data of the pixel at the given location.final intsizeX()final intsizeY()
-
Constructor Details
-
CLNImageView2DScaledS8
public CLNImageView2DScaledS8(CLNImageInfo inImageInfo, int mipLevel, byte[] inData, int inComponentCount) A signed scaled 8-bit view.- Parameters:
inImageInfo- The image infomipLevel- The mip levelinData- The image datainComponentCount- The component count
-
-
Method Details
-
pixelAt
public void pixelAt(int x, int y, double[] pixel) Description copied from interface:CLNImageView2DTypeSample a pixel at the given location.- Parameters:
x- The x locationy- The y locationpixel- The output pixel
-
componentCount
protected final int componentCount() -
pixelRawAtOrdered
Description copied from interface:CLNImageView2DTypeSample 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
-
pixelRawAtOrdered
Description copied from interface:CLNImageView2DTypeSample 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
-
pixelRawAt
public final byte[] pixelRawAt(int x, int y) Description copied from interface:CLNImageView2DTypeSample 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:
pixelRawAtin interfaceCLNImageView2DType- Parameters:
x- The x locationy- The y location- Returns:
- The data for one pixel
-
pixelData
-
imageInfo
-
sizeX
public final int sizeX()- Specified by:
sizeXin interfaceCLNImageView2DType- Returns:
- The size of the view on the X axis
-
sizeY
public final int sizeY()- Specified by:
sizeYin interfaceCLNImageView2DType- 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:CLNImageView2DTypeSample 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:
pixelRawAtin interfaceCLNImageView2DType- Parameters:
x- The x locationy- The y locationoutput- The output buffer- Returns:
- The number of bytes written
-
copyTo
Description copied from interface:CLNImageView2DTypeCopy this image data to the given memory segment.- Specified by:
copyToin interfaceCLNImageView2DType- Parameters:
segment- The memory segmentbyteOrder- The byte order to which to transform the data
-