Class AIAC::Image¶
Class representing the main iamge object for AC.
#include <Image.h>
Public Functions¶
Type | Name |
---|---|
void | DeleteGlTexture () Delete the OpenGL texture object. |
const cv::Mat | GetCvMat () const Get the OpenCV matrix of the image. |
GLuint | GetGlTextureObj () Get the OpenGL texture object of the image. |
int | GetHeight () const Get the height of the image. |
ImTexture | GetImTexture (ImVec2 size=ImVec2(0, 0)) Get the ImGui texture of the image. |
std::string_view | GetPath () const Get the file path of the image. |
const cv::Mat | GetPureCvMat () const Get the pure OpenCV matrix of the image (BGR format). |
int | GetWidth () const Get the width of the image. |
bool | HasGlTextureObj () Check if the image has a valid OpenGL texture object. |
bool | HasImTexture () Check if the image has a valid ImGui texture. |
Image () Default constructor. | |
Image (cv::Mat cvImg) Constructor with OpenCV matrix. | |
Image (AIAC::Image & img) Copy constructor. | |
Image (const char * path, int cvImReadFlag=cv::IMREAD_UNCHANGED) Constructor with file path. | |
void | ReplaceCvMat (cv::Mat cvMat) Replace the OpenCV matrix of the image. |
void | Resize (int newWidth, int newHeight) Resize the image. |
void | SetImTextureSize (ImVec2 size) Set the size of the ImGui texture. |
void | UpdateData (cv::Mat cvImg) Update image data with a new OpenCV matrix. |
void | UpdateGlTextureObj () Update the OpenGL texture object of the image. |
void | UpdateImTexture () Update the ImGui texture of the image. |
Image & | operator= (cv::Mat cvImg) Assignment operator for OpenCV matrix. |
~Image () Destructor. |
Public Functions Documentation¶
function DeleteGlTexture¶
Delete the OpenGL texture object.
function GetCvMat¶
Get the OpenCV matrix of the image.
Returns:
OpenCV matrix of the image.
function GetGlTextureObj¶
Get the OpenGL texture object of the image.
Returns:
OpenGL texture object of the image.
function GetHeight¶
Get the height of the image.
Returns:
Height of the image.
function GetImTexture¶
Get the ImGui texture of the image.
Parameters:
size
Size of the texture.
Returns:
ImGui texture of the image.
function GetPath¶
Get the file path of the image.
Returns:
File path of the image.
function GetPureCvMat¶
Get the pure OpenCV matrix of the image (BGR format).
Returns:
Pure OpenCV matrix of the image.
function GetWidth¶
Get the width of the image.
Returns:
Width of the image.
function HasGlTextureObj¶
Check if the image has a valid OpenGL texture object.
Returns:
True if the image has a valid OpenGL texture object, false otherwise.
function HasImTexture¶
Check if the image has a valid ImGui texture.
Returns:
True if the image has a valid ImGui texture, false otherwise.
function Image [¼]¶
Default constructor.
function Image [2/4]¶
Constructor with OpenCV matrix.
Parameters:
cvImg
OpenCV matrix representing the image.
function Image [¾]¶
Copy constructor.
Parameters:
img
Reference to another AIAC::Image object.
function Image [4/4]¶
Constructor with file path.
Parameters:
path
Path to the image file.cvImReadFlag
Flag for OpenCV image reading.
function ReplaceCvMat¶
Replace the OpenCV matrix of the image.
Parameters:
cvMat
New OpenCV matrix.
function Resize¶
Resize the image.
Parameters:
newWidth
New width of the image.newHeight
New height of the image.
function SetImTextureSize¶
Set the size of the ImGui texture.
Parameters:
size
Size of the texture.
function UpdateData¶
Update image data with a new OpenCV matrix.
Parameters:
cvImg
OpenCV matrix representing the new image data.
function UpdateGlTextureObj¶
Update the OpenGL texture object of the image.
function UpdateImTexture¶
Update the ImGui texture of the image.
function operator=¶
Assignment operator for OpenCV matrix.
Parameters:
cvImg
OpenCV matrix representing the new image data.
Returns:
Reference to the updated image object.
function ~Image¶
Destructor.
The documentation for this class was generated from the following file src/AIAC/Image.h