Skip to content

Class AIAC::Image

ClassList > 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.

inline void AIAC::Image::DeleteGlTexture () 


function GetCvMat

Get the OpenCV matrix of the image.

inline const cv::Mat AIAC::Image::GetCvMat () const

Returns:

OpenCV matrix of the image.


function GetGlTextureObj

Get the OpenGL texture object of the image.

GLuint AIAC::Image::GetGlTextureObj () 

Returns:

OpenGL texture object of the image.


function GetHeight

Get the height of the image.

inline int AIAC::Image::GetHeight () const

Returns:

Height of the image.


function GetImTexture

Get the ImGui texture of the image.

ImTexture AIAC::Image::GetImTexture (
    ImVec2 size=ImVec2(0, 0)
) 

Parameters:

  • size Size of the texture.

Returns:

ImGui texture of the image.


function GetPath

Get the file path of the image.

inline std::string_view AIAC::Image::GetPath () const

Returns:

File path of the image.


function GetPureCvMat

Get the pure OpenCV matrix of the image (BGR format).

inline const cv::Mat AIAC::Image::GetPureCvMat () const

Returns:

Pure OpenCV matrix of the image.


function GetWidth

Get the width of the image.

inline int AIAC::Image::GetWidth () const

Returns:

Width of the image.


function HasGlTextureObj

Check if the image has a valid OpenGL texture object.

inline bool AIAC::Image::HasGlTextureObj () 

Returns:

True if the image has a valid OpenGL texture object, false otherwise.


function HasImTexture

Check if the image has a valid ImGui texture.

inline bool AIAC::Image::HasImTexture () 

Returns:

True if the image has a valid ImGui texture, false otherwise.


function Image [¼]

Default constructor.

AIAC::Image::Image () 


function Image [2/4]

Constructor with OpenCV matrix.

AIAC::Image::Image (
    cv::Mat cvImg
) 

Parameters:

  • cvImg OpenCV matrix representing the image.

function Image [¾]

Copy constructor.

AIAC::Image::Image (
    AIAC::Image & img
) 

Parameters:


function Image [4/4]

Constructor with file path.

AIAC::Image::Image (
    const char * path,
    int cvImReadFlag=cv::IMREAD_UNCHANGED
) 

Parameters:

  • path Path to the image file.
  • cvImReadFlag Flag for OpenCV image reading.

function ReplaceCvMat

Replace the OpenCV matrix of the image.

inline void AIAC::Image::ReplaceCvMat (
    cv::Mat cvMat
) 

Parameters:

  • cvMat New OpenCV matrix.

function Resize

Resize the image.

inline void AIAC::Image::Resize (
    int newWidth,
    int newHeight
) 

Parameters:

  • newWidth New width of the image.
  • newHeight New height of the image.

function SetImTextureSize

Set the size of the ImGui texture.

inline void AIAC::Image::SetImTextureSize (
    ImVec2 size
) 

Parameters:

  • size Size of the texture.

function UpdateData

Update image data with a new OpenCV matrix.

void AIAC::Image::UpdateData (
    cv::Mat cvImg
) 

Parameters:

  • cvImg OpenCV matrix representing the new image data.

function UpdateGlTextureObj

Update the OpenGL texture object of the image.

void AIAC::Image::UpdateGlTextureObj () 


function UpdateImTexture

Update the ImGui texture of the image.

void AIAC::Image::UpdateImTexture () 


function operator=

Assignment operator for OpenCV matrix.

inline Image & AIAC::Image::operator= (
    cv::Mat cvImg
) 

Parameters:

  • cvImg OpenCV matrix representing the new image data.

Returns:

Reference to the updated image object.


function ~Image

Destructor.

AIAC::Image::~Image () 



The documentation for this class was generated from the following file src/AIAC/Image.h