#include <but_rostexture.h>
Classes | |
class | RTCException |
Public Member Functions | |
bool | convert (const sensor_msgs::Image::ConstPtr &image, const std::string &texture_name, bool writeInfo=false) |
Set input image and convert it. | |
bool | convert (const sensor_msgs::Image::ConstPtr &image, bool writeInfo=false) |
Set input image and convert it. Internal name is used. | |
CRosTextureConverter (const std::string &encoding=std::string(), bool bStaticTexture=false) | |
Constructor. | |
CRosTextureConverter (const std::string &name, const std::string &encoding, bool bStaticTexture=false) | |
Constructor - with texture name. | |
Ogre::TexturePtr & | getOgreTexture () |
Get output ogre image. | |
cv_bridge::CvImage * | getOpenCVImage () |
Get output opencv image. | |
void | setEncoding (const std::string &encoding) |
Set output encoding. | |
~CRosTextureConverter () | |
Destructor. | |
Protected Member Functions | |
Ogre::PixelFormat | getFormat (const std::string &encoding) |
Convert string encoding to Ogre pixelformat. | |
void | initOgreTexture (Ogre::PixelFormat format, const std::string &name) |
Initialize Ogre texture. | |
void | writeStats (Ogre::Image &image) |
Write some texture stats. | |
Protected Attributes | |
bool | m_bStaticTexture |
Should be texture initialized only once? | |
cv_bridge::CvImagePtr | m_cv_image |
OpenCv image pointer. | |
Ogre::Image | m_empty_image |
Helper image. | |
Ogre::TexturePtr | m_ogre_image |
Ogre image pointer. | |
std::string | m_output_encoding |
Used output format. | |
Ogre::PixelFormat | m_static_format |
Used static texture pixel format. | |
std::string | m_texture_name |
Used Ogre texture name. |
Connection between ROS and Ogre images. Internally uses OpenCV to convert between formats
Definition at line 62 of file but_rostexture.h.
srs_ui_but::CRosTextureConverter::CRosTextureConverter | ( | const std::string & | encoding = std::string() , |
bool | bStaticTexture = false |
||
) |
srs_ui_but::CRosTextureConverter::CRosTextureConverter | ( | const std::string & | name, |
const std::string & | encoding, | ||
bool | bStaticTexture = false |
||
) |
Constructor - with texture name.
Constructor - with texture name
Definition at line 81 of file but_rostexture.cpp.
bool srs_ui_but::CRosTextureConverter::convert | ( | const sensor_msgs::Image::ConstPtr & | image, |
const std::string & | texture_name, | ||
bool | writeInfo = false |
||
) |
Set input image and convert it.
Definition at line 128 of file but_rostexture.cpp.
bool srs_ui_but::CRosTextureConverter::convert | ( | const sensor_msgs::Image::ConstPtr & | image, |
bool | writeInfo = false |
||
) | [inline] |
Set input image and convert it. Internal name is used.
Definition at line 95 of file but_rostexture.h.
Ogre::PixelFormat srs_ui_but::CRosTextureConverter::getFormat | ( | const std::string & | encoding | ) | [protected] |
Convert string encoding to Ogre pixelformat.
Convert string encoding to Ogre pixelformat
Definition at line 215 of file but_rostexture.cpp.
Ogre::TexturePtr& srs_ui_but::CRosTextureConverter::getOgreTexture | ( | ) | [inline] |
Get output ogre image.
Definition at line 101 of file but_rostexture.h.
Get output opencv image.
Definition at line 104 of file but_rostexture.h.
void srs_ui_but::CRosTextureConverter::initOgreTexture | ( | Ogre::PixelFormat | format, |
const std::string & | name | ||
) | [protected] |
void srs_ui_but::CRosTextureConverter::setEncoding | ( | const std::string & | encoding | ) | [inline] |
Set output encoding.
Definition at line 89 of file but_rostexture.h.
void srs_ui_but::CRosTextureConverter::writeStats | ( | Ogre::Image & | image | ) | [protected] |
Write some texture stats.
Write some texture stats
Definition at line 284 of file but_rostexture.cpp.
Should be texture initialized only once?
Definition at line 138 of file but_rostexture.h.
OpenCv image pointer.
Definition at line 120 of file but_rostexture.h.
Ogre::Image srs_ui_but::CRosTextureConverter::m_empty_image [protected] |
Helper image.
Definition at line 135 of file but_rostexture.h.
Ogre::TexturePtr srs_ui_but::CRosTextureConverter::m_ogre_image [protected] |
Ogre image pointer.
Definition at line 123 of file but_rostexture.h.
std::string srs_ui_but::CRosTextureConverter::m_output_encoding [protected] |
Used output format.
Definition at line 126 of file but_rostexture.h.
Ogre::PixelFormat srs_ui_but::CRosTextureConverter::m_static_format [protected] |
Used static texture pixel format.
Definition at line 129 of file but_rostexture.h.
std::string srs_ui_but::CRosTextureConverter::m_texture_name [protected] |
Used Ogre texture name.
Definition at line 132 of file but_rostexture.h.