Main MRPT website > C++ reference
MRPT logo

mrpt::gui::CDisplayWindow Class Reference

This class creates a window as a graphical user interface (GUI) for displaying images to the user. More...

#include <mrpt/gui/CDisplayWindow.h>

Inheritance diagram for mrpt::gui::CDisplayWindow:
Inheritance graph
[legend]
Collaboration diagram for mrpt::gui::CDisplayWindow:
Collaboration 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.
void showImageAndPoints (const CImage &img, const vector_float &x, const vector_float &y, const TColor &color=TColor::red)
 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)
 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())
 Class factory returning a smart pointer.

Protected Attributes

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

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 48 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 CDisplayWindowPtr mrpt::gui::CDisplayWindow::Create ( const std::string &  windowCaption = std::string()  )  [inline, static]

Class factory returning a smart pointer.

Definition at line 65 of file CDisplayWindow.h.

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

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.

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.

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

Definition at line 85 of file CDisplayWindow.h.

References mrpt::utils::CImage::colorImage(), mrpt::format(), MRPT_END, MRPT_START, mrpt::utils::TColor::red, and mrpt::utils::round().

void mrpt::gui::CDisplayWindow::showImageAndPoints ( const CImage img,
const vector_float x,
const vector_float y,
const TColor color = TColor::red 
)

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 MATCHEDLIST >
void mrpt::gui::CDisplayWindow::showImagesAndMatchedPoints ( const CImage img1,
const CImage img2,
const MATCHEDLIST &  mList,
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. 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_END, MRPT_START, and mrpt::utils::round().

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

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


Member Data Documentation

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

Definition at line 57 of file CDisplayWindow.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.1 for MRPT 0.9.0 SVN: at Mon Jun 7 06:47:58 UTC 2010