#include <mrpt/gui/CDisplayWindowPlots.h>
Public Member Functions | |
void * | getWxObject () |
Read-only access to the wxDialog object. | |
void | notifyChildWindowDestruction () |
Called by wx main thread to set m_hwnd to NULL. | |
CDisplayWindowPlots (const std::string &windowCaption=std::string(), unsigned int initialWidth=350, unsigned int initialHeight=300) | |
Constructor. | |
~CDisplayWindowPlots () | |
Destructor. | |
bool | isOpen () |
Returns false if the user has already closed the window. | |
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. | |
int | waitForKey () |
Waits for any key to be pushed on the image or the console, and returns the key code. | |
bool | keyHit () const |
Returns true if a key has been pushed, without blocking waiting for a new key being pushed. | |
void | clearKeyHitFlag () |
Assure that "keyHit" will return false until the next pushed key. | |
void | setWindowTitle (const std::string &str) |
Changes the window title text. | |
void | enableMousePanZoom (bool enabled) |
Enable/disable the feature of pan/zoom with the mouse (default=enabled). | |
void | plot (const vector_float &x, const vector_float &y, const std::string &lineFormat, const std::string &plotName=std::string("plotXY")) |
Adds a new layer with a 2D plot based on two vectors of X and Y points, using a MATLAB-like syntax. | |
void | plot (const vector_double &x, const vector_double &y, const std::string &lineFormat=std::string("b-"), const std::string &plotName=std::string("plotXY")) |
Adds a new layer with a 2D plot based on two vectors of X and Y points, using a MATLAB-like syntax. | |
void | plot (const vector_float &y, const std::string &lineFormat=std::string("b-"), const std::string &plotName=std::string("plotXY")) |
Adds a new layer with a 2D plot based on the vector Y, using a MATLAB-like syntax. | |
void | plot (const vector_double &y, const std::string &lineFormat=std::string("b-"), const std::string &plotName=std::string("plotXY")) |
void | axis (float x_min, float x_max, float y_min, float y_max, bool aspectRatioFix=false) |
Set the view area according to the passed coordinated. | |
void | axis_equal (bool enable=true) |
Enable/disable the fixed X/Y aspect ratio fix feature (default=disabled). | |
void | axis_fit (bool aspectRatioFix=false) |
Fix automatically the view area according to existing graphs. | |
void | plotEllipse (const float &mean_x, const float &mean_y, const CMatrixFloat &cov22, const float &quantiles, const std::string &lineFormat=std::string("b-"), const std::string &plotName=std::string("plotEllipse")) |
Plots a 2D ellipse given its mean, covariance matrix, and Each call to this function creates a new plot, unless the plot name coincides with an already existing plot: in this case the new values are used to update this existing layer (this also applies to using the default plot name). | |
void | image (const utils::CMRPTImage &img, const float &x_left, const float &y_bottom, const float &x_width, const float &y_height, const std::string &plotName=std::string("plotEllipse")) |
Adds a bitmap image layer. | |
Public Attributes | |
synch::CSemaphore | m_semThreadReady |
This semaphore will be signaled when the wx window is built and ready. | |
synch::CSemaphore | m_semWindowDestroyed |
This semaphore will be signaled when the wx window is destroyed. | |
Protected Attributes | |
std::string | m_caption |
The caption of the window:. | |
void_ptr_noncopy | m_hwnd |
The window's handle. | |
volatile int | m_keyPushed |
Auxiliary. | |
volatile int | m_keyPushedCode |
Friends | |
class | CWindowDialogPlots |
Definition at line 55 of file CDisplayWindowPlots.h.
mrpt::gui::CDisplayWindowPlots::CDisplayWindowPlots | ( | const std::string & | windowCaption = std::string() , |
|
unsigned int | initialWidth = 350 , |
|||
unsigned int | initialHeight = 300 | |||
) |
Constructor.
mrpt::gui::CDisplayWindowPlots::~CDisplayWindowPlots | ( | ) |
Destructor.
void mrpt::gui::CDisplayWindowPlots::axis | ( | float | x_min, | |
float | x_max, | |||
float | y_min, | |||
float | y_max, | |||
bool | aspectRatioFix = false | |||
) |
Set the view area according to the passed coordinated.
void mrpt::gui::CDisplayWindowPlots::axis_equal | ( | bool | enable = true |
) |
Enable/disable the fixed X/Y aspect ratio fix feature (default=disabled).
void mrpt::gui::CDisplayWindowPlots::axis_fit | ( | bool | aspectRatioFix = false |
) |
Fix automatically the view area according to existing graphs.
void mrpt::gui::CDisplayWindowPlots::clearKeyHitFlag | ( | ) | [inline] |
Assure that "keyHit" will return false until the next pushed key.
Definition at line 134 of file CDisplayWindowPlots.h.
void mrpt::gui::CDisplayWindowPlots::enableMousePanZoom | ( | bool | enabled | ) |
Enable/disable the feature of pan/zoom with the mouse (default=enabled).
void* mrpt::gui::CDisplayWindowPlots::getWxObject | ( | ) | [inline] |
void mrpt::gui::CDisplayWindowPlots::image | ( | const utils::CMRPTImage & | img, | |
const float & | x_left, | |||
const float & | y_bottom, | |||
const float & | x_width, | |||
const float & | y_height, | |||
const std::string & | plotName = std::string("plotEllipse") | |||
) |
Adds a bitmap image layer.
Each call to this function creates a new layer, unless the plot name coincides with an already existing plot: in this case the new values are used to update this existing layer (this also applies to using the default plot name).
bool mrpt::gui::CDisplayWindowPlots::isOpen | ( | ) |
Returns false if the user has already closed the window.
bool mrpt::gui::CDisplayWindowPlots::keyHit | ( | ) | const [inline] |
Returns true if a key has been pushed, without blocking waiting for a new key being pushed.
Definition at line 126 of file CDisplayWindowPlots.h.
void mrpt::gui::CDisplayWindowPlots::notifyChildWindowDestruction | ( | ) |
Called by wx main thread to set m_hwnd to NULL.
void mrpt::gui::CDisplayWindowPlots::plot | ( | const vector_double & | y, | |
const std::string & | lineFormat = std::string("b-") , |
|||
const std::string & | plotName = std::string("plotXY") | |||
) |
void mrpt::gui::CDisplayWindowPlots::plot | ( | const vector_float & | y, | |
const std::string & | lineFormat = std::string("b-") , |
|||
const std::string & | plotName = std::string("plotXY") | |||
) |
Adds a new layer with a 2D plot based on the vector Y, using a MATLAB-like syntax.
Each call to this function creates a new plot, unless the plot name coincides with an already existing plot: in this case the X & Y points are used to update this existing layer (this also applies to using the default plot name). The lineFormat string is a combination of the following characters:
Examples:
void mrpt::gui::CDisplayWindowPlots::plot | ( | const vector_double & | x, | |
const vector_double & | y, | |||
const std::string & | lineFormat = std::string("b-") , |
|||
const std::string & | plotName = std::string("plotXY") | |||
) |
Adds a new layer with a 2D plot based on two vectors of X and Y points, using a MATLAB-like syntax.
Each call to this function creates a new plot, unless the plot name coincides with an already existing plot: in this case the X & Y points are used to update this existing layer (this also applies to using the default plot name). The lineFormat string is a combination of the following characters:
Examples:
void mrpt::gui::CDisplayWindowPlots::plot | ( | const vector_float & | x, | |
const vector_float & | y, | |||
const std::string & | lineFormat, | |||
const std::string & | plotName = std::string("plotXY") | |||
) |
Adds a new layer with a 2D plot based on two vectors of X and Y points, using a MATLAB-like syntax.
Each call to this function creates a new plot, unless the plot name coincides with an already existing plot: in this case the X & Y points are used to update this existing layer (this also applies to using the default plot name). The lineFormat string is a combination of the following characters:
Examples:
void mrpt::gui::CDisplayWindowPlots::plotEllipse | ( | const float & | mean_x, | |
const float & | mean_y, | |||
const CMatrixFloat & | cov22, | |||
const float & | quantiles, | |||
const std::string & | lineFormat = std::string("b-") , |
|||
const std::string & | plotName = std::string("plotEllipse") | |||
) |
Plots a 2D ellipse given its mean, covariance matrix, and Each call to this function creates a new plot, unless the plot name coincides with an already existing plot: in this case the new values are used to update this existing layer (this also applies to using the default plot name).
For a description of lineFormat see CDisplayWindowPlots::plot. The "quantiles" value determines the confidence interval for the ellipse:
void mrpt::gui::CDisplayWindowPlots::resize | ( | unsigned int | width, | |
unsigned int | height | |||
) |
Resizes the window, stretching the image to fit into the display area.
void mrpt::gui::CDisplayWindowPlots::setPos | ( | int | x, | |
int | y | |||
) |
Changes the position of the window on the screen.
void mrpt::gui::CDisplayWindowPlots::setWindowTitle | ( | const std::string & | str | ) |
Changes the window title text.
int mrpt::gui::CDisplayWindowPlots::waitForKey | ( | ) |
Waits for any key to be pushed on the image or the console, and returns the key code.
Key codes are Virtual Key Codes from wxWidgets: http://docs.wxwidgets.org/stable/wx_keycodes.html
friend class CWindowDialogPlots [friend] |
Definition at line 60 of file CDisplayWindowPlots.h.
std::string mrpt::gui::CDisplayWindowPlots::m_caption [protected] |
volatile int mrpt::gui::CDisplayWindowPlots::m_keyPushed [protected] |
volatile int mrpt::gui::CDisplayWindowPlots::m_keyPushedCode [protected] |
Definition at line 92 of file CDisplayWindowPlots.h.
This semaphore will be signaled when the wx window is built and ready.
Definition at line 65 of file CDisplayWindowPlots.h.
This semaphore will be signaled when the wx window is destroyed.
Definition at line 69 of file CDisplayWindowPlots.h.
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN:exported at Thu May 21 04:14:55 UTC 2009 |