This class creates a window as a graphical user interface (GUI) for displaying images to the user.
For a list of supported events with the observer/observable pattern, see the discussion in mrpt::gui::CBaseGUIWindow.
Definition at line 49 of file CDisplayWindow.h.
#include <mrpt/gui/CDisplayWindow.h>
Public Member Functions | |
CDisplayWindow (const std::string &windowCaption=std::string(), unsigned int initWidth=400, unsigned int initHeight=400) | |
Constructor. | |
virtual | ~CDisplayWindow () |
Destructor. | |
virtual bool | getLastMousePosition (int &x, int &y) const |
Gets the last x,y pixel coordinates of the mouse. | |
virtual void | setCursorCross (bool cursorIsCross) |
Set cursor style to default (cursorIsCross=false) or to a cross (cursorIsCross=true) | |
void | showImageAndPoints (const CImage &img, const vector_float &x, const vector_float &y, const TColor &color=TColor::red, const bool &showNumbers=false) |
Show a given color or grayscale image on the window and print a set of points on it. | |
template<class FEATURELIST > | |
void | showImageAndPoints (const CImage &img, const FEATURELIST &list, const TColor &color=TColor::red, const bool &showIDs=false) |
Show a given color or grayscale image on the window and print a set of points on it. | |
template<class FEATURELIST > | |
void | showTiledImageAndPoints (const CImage &img, const FEATURELIST &list, const TColor &color=TColor::red) |
Show a given color or grayscale image on the window and print a set of points on it and a set of lines splitting the image in tiles. | |
template<class MATCHEDLIST > | |
void | showImagesAndMatchedPoints (const CImage &img1, const CImage &img2, const MATCHEDLIST &mList, const TColor &color=TColor::red, bool showNumbers=false) |
Show a pair of given color or grayscale images (put together) on the window and print a set of matches on them. | |
template<class FEATURELIST > | |
void | showImagesAndMatchedPoints (const CImage &img1, const CImage &img2, const FEATURELIST &leftList, const FEATURELIST &rightList, const TColor &color=TColor::red) |
Show a pair of given color or grayscale images (put together) on the window and print a set of matches on them. | |
void | showImage (const CImage &img) |
Show a given color or grayscale image on the window. | |
void | plot (const vector_float &x, const vector_float &y) |
Plots a graph in MATLAB-like style. | |
void | plot (const vector_float &y) |
Plots a graph in MATLAB-like style. | |
void | resize (unsigned int width, unsigned int height) |
Resizes the window, stretching the image to fit into the display area. | |
void | setPos (int x, int y) |
Changes the position of the window on the screen. | |
void | enableCursorCoordinatesVisualization (bool enable) |
Enables or disables the visualization of cursor coordinates on the window caption (default = enabled). | |
void | setWindowTitle (const std::string &str) |
Changes the window title text. | |
Static Public Member Functions | |
static CDisplayWindowPtr | Create (const std::string &windowCaption=std::string(), unsigned int initWidth=400, unsigned int initHeight=400) |
Class factory returning a smart pointer. | |
Protected Attributes | |
bool | m_enableCursorCoordinates |
Enables or disables the visualization of cursor coordinates on the window caption. | |
RTTI stuff | |
typedef CDisplayWindowPtr | SmartPtr |
static mrpt::utils::CLASSINIT | _init_CDisplayWindow |
static mrpt::utils::TRuntimeClassId | classCDisplayWindow |
static const mrpt::utils::TRuntimeClassId * | classinfo |
static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
Returns information about the class of an object in runtime. | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. | |
static mrpt::utils::CObject * | CreateObject () |
static CDisplayWindowPtr | Create () |
A typedef for the associated smart pointer
Definition at line 52 of file CDisplayWindow.h.
mrpt::gui::CDisplayWindow::CDisplayWindow | ( | const std::string & | windowCaption = std::string() , |
unsigned int | initWidth = 400 , |
||
unsigned int | initHeight = 400 |
||
) |
Constructor.
virtual mrpt::gui::CDisplayWindow::~CDisplayWindow | ( | ) | [virtual] |
Destructor.
static const mrpt::utils::TRuntimeClassId* mrpt::gui::CDisplayWindow::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::gui::CBaseGUIWindow.
static CDisplayWindowPtr mrpt::gui::CDisplayWindow::Create | ( | ) | [static] |
static CDisplayWindowPtr mrpt::gui::CDisplayWindow::Create | ( | const std::string & | windowCaption = std::string() , |
unsigned int | initWidth = 400 , |
||
unsigned int | initHeight = 400 |
||
) | [inline, static] |
Class factory returning a smart pointer.
Definition at line 66 of file CDisplayWindow.h.
static mrpt::utils::CObject* mrpt::gui::CDisplayWindow::CreateObject | ( | ) | [static] |
virtual mrpt::utils::CObject* mrpt::gui::CDisplayWindow::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
void mrpt::gui::CDisplayWindow::enableCursorCoordinatesVisualization | ( | bool | enable | ) | [inline] |
Enables or disables the visualization of cursor coordinates on the window caption (default = enabled).
Definition at line 216 of file CDisplayWindow.h.
virtual bool mrpt::gui::CDisplayWindow::getLastMousePosition | ( | int & | x, |
int & | y | ||
) | const [virtual] |
Gets the last x,y pixel coordinates of the mouse.
Implements mrpt::gui::CBaseGUIWindow.
virtual const mrpt::utils::TRuntimeClassId* mrpt::gui::CDisplayWindow::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::gui::CBaseGUIWindow.
void mrpt::gui::CDisplayWindow::plot | ( | const vector_float & | y | ) |
Plots a graph in MATLAB-like style.
void mrpt::gui::CDisplayWindow::plot | ( | const vector_float & | x, |
const vector_float & | y | ||
) |
Plots a graph in MATLAB-like style.
void mrpt::gui::CDisplayWindow::resize | ( | unsigned int | width, |
unsigned int | height | ||
) | [virtual] |
Resizes the window, stretching the image to fit into the display area.
Implements mrpt::gui::CBaseGUIWindow.
virtual void mrpt::gui::CDisplayWindow::setCursorCross | ( | bool | cursorIsCross | ) | [virtual] |
Set cursor style to default (cursorIsCross=false) or to a cross (cursorIsCross=true)
Implements mrpt::gui::CBaseGUIWindow.
void mrpt::gui::CDisplayWindow::setPos | ( | int | x, |
int | y | ||
) | [virtual] |
Changes the position of the window on the screen.
Implements mrpt::gui::CBaseGUIWindow.
void mrpt::gui::CDisplayWindow::setWindowTitle | ( | const std::string & | str | ) | [virtual] |
Changes the window title text.
Implements mrpt::gui::CBaseGUIWindow.
void mrpt::gui::CDisplayWindow::showImage | ( | const CImage & | img | ) |
Show a given color or grayscale image on the window.
It adapts the size of the window to that of the image.
void mrpt::gui::CDisplayWindow::showImageAndPoints | ( | const CImage & | img, |
const vector_float & | x, | ||
const vector_float & | y, | ||
const TColor & | color = TColor::red , |
||
const bool & | showNumbers = false |
||
) |
Show a given color or grayscale image on the window and print a set of points on it.
It adapts the size of the window to that of the image.
void mrpt::gui::CDisplayWindow::showImageAndPoints | ( | const CImage & | img, |
const FEATURELIST & | list, | ||
const TColor & | color = TColor::red , |
||
const bool & | showIDs = false |
||
) | [inline] |
Show a given color or grayscale image on the window and print a set of points on it.
It adapts the size of the window to that of the image. The class of FEATURELIST can be: mrpt::vision::CFeatureList or any STL container of entities having "x","y" and "ID" fields.
Definition at line 94 of file CDisplayWindow.h.
References CH_RGB, mrpt::utils::CImage::colorImage(), MRPT_END, and MRPT_START.
void mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints | ( | const CImage & | img1, |
const CImage & | img2, | ||
const FEATURELIST & | leftList, | ||
const FEATURELIST & | rightList, | ||
const TColor & | color = TColor::red |
||
) | [inline] |
Show a pair of given color or grayscale images (put together) on the window and print a set of matches on them.
It adapts the size of the window to that of the image. FEATURELIST can be of the class: mrpt::vision::CFeatureList
Definition at line 170 of file CDisplayWindow.h.
References ASSERT_, mrpt::utils::CImage::getWidth(), MRPT_END, MRPT_START, and mrpt::utils::round().
void mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints | ( | const CImage & | img1, |
const CImage & | img2, | ||
const MATCHEDLIST & | mList, | ||
const TColor & | color = TColor::red , |
||
bool | showNumbers = false |
||
) | [inline] |
Show a pair of given color or grayscale images (put together) on the window and print a set of matches on them.
It adapts the size of the window to that of the image. MATCHEDLIST can be of the class: mrpt::vision::CMatchedFeatureList, or any STL container of pairs of anything having ".x" and ".y" (e.g. mrpt::math::TPoint2D)
Definition at line 134 of file CDisplayWindow.h.
References mrpt::utils::CImage::getWidth(), mrpt::utils::CImage::joinImagesHorz(), MRPT_END, MRPT_START, mrpt::utils::round(), and mrpt::system::os::sprintf().
void mrpt::gui::CDisplayWindow::showTiledImageAndPoints | ( | const CImage & | img, |
const FEATURELIST & | list, | ||
const TColor & | color = TColor::red |
||
) | [inline] |
Show a given color or grayscale image on the window and print a set of points on it and a set of lines splitting the image in tiles.
It adapts the size of the window to that of the image. The class of FEATURELIST can be: mrpt::vision::CFeatureList
Definition at line 109 of file CDisplayWindow.h.
References mrpt::utils::CImage::colorImage(), mrpt::utils::TColor::green, MRPT_END, and MRPT_START.
mrpt::utils::CLASSINIT mrpt::gui::CDisplayWindow::_init_CDisplayWindow [static, protected] |
Definition at line 52 of file CDisplayWindow.h.
Definition at line 52 of file CDisplayWindow.h.
const mrpt::utils::TRuntimeClassId* mrpt::gui::CDisplayWindow::classinfo [static] |
Definition at line 52 of file CDisplayWindow.h.
bool mrpt::gui::CDisplayWindow::m_enableCursorCoordinates [protected] |
Enables or disables the visualization of cursor coordinates on the window caption.
Definition at line 58 of file CDisplayWindow.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN:exported at Tue Jan 25 21:56:31 UTC 2011 |