Package com.flir.thermalsdk.image
Class JavaImageBuffer
java.lang.Object
com.flir.thermalsdk.image.JavaImageBuffer
- All Implemented Interfaces:
ImageBuffer
Provides a buffer for holding image data.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.flir.thermalsdk.image.ImageBuffer
ImageBuffer.Format
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal ImageBuffer.Format
Current pixel format of the buffer.final int
Height of the image's pixels.final byte[]
Can store any pixels data.final int
Stride of the image's pixels.final int
Width of the image's pixels. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Current pixel format of the buffer.int
Height of the image's pixels.byte[]
Can store any pixels data.int
Stride of the image's pixels.int
getWidth()
Width of the image's pixels.int
hashCode()
toString()
void
with
(Consumer<ByteBuffer> functionToRun) Lock buffer and get direct access to the pixel data.
-
Field Details
-
format
Current pixel format of the buffer. -
pixelBuffer
public final byte[] pixelBufferCan store any pixels data. May contain colorized pixel data (i.e. a fusion of thermal and visual data), may also contain plain DC/visual pixels. -
height
public final int heightHeight of the image's pixels. -
width
public final int widthWidth of the image's pixels. -
stride
public final int strideStride of the image's pixels.
-
-
Method Details
-
getFormat
Description copied from interface:ImageBuffer
Current pixel format of the buffer.- Specified by:
getFormat
in interfaceImageBuffer
-
getPixelBuffer
public byte[] getPixelBuffer()Description copied from interface:ImageBuffer
Can store any pixels data. May contain colorized pixel data (i.e. a fusion of thermal and visual data), may also contain plain DC/visual pixels. NOTE: May copy, preferImageBuffer.with(com.flir.thermalsdk.utils.Consumer<java.nio.ByteBuffer>)
.- Specified by:
getPixelBuffer
in interfaceImageBuffer
-
getHeight
public int getHeight()Description copied from interface:ImageBuffer
Height of the image's pixels.- Specified by:
getHeight
in interfaceImageBuffer
-
getWidth
public int getWidth()Description copied from interface:ImageBuffer
Width of the image's pixels.- Specified by:
getWidth
in interfaceImageBuffer
-
getStride
public int getStride()Description copied from interface:ImageBuffer
Stride of the image's pixels.- Specified by:
getStride
in interfaceImageBuffer
-
with
Description copied from interface:ImageBuffer
Lock buffer and get direct access to the pixel data. This lock is about pinning a GPU buffer to get direct access to the pixels not the multithreading lock.- Specified by:
with
in interfaceImageBuffer
- Parameters:
functionToRun
- Function to be executed while holding the lock.
-
equals
-
hashCode
public int hashCode() -
toString
-