#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. | |
void | setPushedKey (int k) |
Used internally to notify of a key event. | |
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. |
Definition at line 53 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::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.
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::setPushedKey | ( | int | k | ) |
Used internally to notify of a key event.
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.
std::string mrpt::gui::CDisplayWindowPlots::m_caption [protected] |
volatile int mrpt::gui::CDisplayWindowPlots::m_keyPushed [protected] |
This semaphore will be signaled when the wx window is built and ready.
Definition at line 61 of file CDisplayWindowPlots.h.
This semaphore will be signaled when the wx window is destroyed.
Definition at line 65 of file CDisplayWindowPlots.h.
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN:exported at Mon Jan 12 13:00:16 UTC 2009 |