Image Utilities (IU)
|
Allows to display images directly in an OpenGL Widget. More...
#include <qt5imagegpuwidget.h>
Public Slots | |
void | update_image (iu::ImageGpu_8u_C1 *im) |
void | update_image (iu::ImageGpu_8u_C4 *im) |
void | update_image (iu::ImageGpu_32f_C1 *im, float minVal, float maxVal) |
void | update_image_colormap (iu::ImageGpu_32f_C1 *im, float minVal, float maxVal) |
Public Member Functions | |
Qt5ImageGpuWidget (const iu::Size< 2 > sz, QWidget *parent=NULL) | |
Protected Member Functions | |
void | paintGL () |
void | initializeGL () |
void | resizeGL (int w, int h) |
void | init_cuda () |
Protected Attributes | |
GLuint | texture_ |
cudaGraphicsResource_t | cuda_img_ |
QOpenGLBuffer | pbo_ |
iu::Size< 2 > | image_size_ |
QOpenGLShaderProgram * | shader_program_ |
QOpenGLVertexArrayObject * | vao_ |
QOpenGLBuffer * | vbo_ |
Allows to display images directly in an OpenGL Widget.
Images are kept on the graphics card, without the need to copy to the host for displaying.
|
explicit |
The non-default constructor
sz | Output image size |
parent | Parent widget |
|
slot |
Set a new grayscale image
im | A grayscale image in uchar format |
|
slot |
Set a new RGBA image
im | A RGBA image in uchar format |
|
slot |
Set a new grayscale image
im | A grayscale image in float format |
minVal | Minimum value to display-> black |
maxVal | Maximum value to display -> white |
|
slot |
Set a new grayscale image to be displayed in jet colormap
im | A grayscale image in float format |
minVal | Minimum value to display-> black |
maxVal | Maximum value to display -> white |