Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Static Public Member Functions | Protected Attributes

mrpt::gui::CDisplayWindow Class Reference


Detailed Description

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 42 of file CDisplayWindow.h.

#include <mrpt/gui/CDisplayWindow.h>

Inheritance diagram for mrpt::gui::CDisplayWindow:
Inheritance graph
[legend]

List of all members.

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::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CDisplayWindowPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 45 of file CDisplayWindow.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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 59 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 209 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.

Returns:
False if the window is closed.

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.

template<class FEATURELIST >
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 87 of file CDisplayWindow.h.

References CH_RGB, mrpt::utils::CImage::colorImage(), MRPT_END, and MRPT_START.

template<class FEATURELIST >
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 163 of file CDisplayWindow.h.

References ASSERT_, mrpt::utils::CImage::getWidth(), MRPT_END, MRPT_START, and mrpt::utils::round().

template<class MATCHEDLIST >
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 127 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().

template<class FEATURELIST >
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 102 of file CDisplayWindow.h.

References mrpt::utils::CImage::colorImage(), mrpt::utils::TColor::green, MRPT_END, and MRPT_START.


Member Data Documentation

Definition at line 45 of file CDisplayWindow.h.

Definition at line 45 of file CDisplayWindow.h.

Definition at line 45 of file CDisplayWindow.h.

Enables or disables the visualization of cursor coordinates on the window caption.

Definition at line 51 of file CDisplayWindow.h.




Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:46:17 UTC 2011