Simple point cloud visualization class. More...
#include <cloud_viewer.h>
Classes | |
struct | CloudViewer_impl |
Public Types | |
typedef pcl::PointCloud < pcl::PointXYZRGBA > | ColorACloud |
typedef pcl::PointCloud < pcl::PointXYZRGB > | ColorCloud |
typedef pcl::PointCloud < pcl::PointXYZI > | GrayCloud |
typedef pcl::PointCloud < pcl::PointXYZ > | MonochromeCloud |
typedef boost::function1< void, pcl::visualization::PCLVisualizer & > | VizCallable |
Public Member Functions | |
CloudViewer (const std::string &window_name) | |
Construct a cloud viewer, with a window name. | |
boost::signals2::connection | registerKeyboardCallback (void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=NULL) |
Register a callback function for keyboard events. | |
template<typename T > | |
boost::signals2::connection | registerKeyboardCallback (void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=NULL) |
Register a callback function for keyboard events. | |
boost::signals2::connection | registerMouseCallback (void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=NULL) |
Register a callback function for mouse events. | |
template<typename T > | |
boost::signals2::connection | registerMouseCallback (void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=NULL) |
Register a callback function for mouse events. | |
boost::signals2::connection | registerPointPickingCallback (void(*callback)(const pcl::visualization::PointPickingEvent &, void *), void *cookie=NULL) |
Register a callback function for point picking events. | |
template<typename T > | |
boost::signals2::connection | registerPointPickingCallback (void(T::*callback)(const pcl::visualization::PointPickingEvent &, void *), T &instance, void *cookie=NULL) |
Register a callback function for point picking events. | |
void | removeVisualizationCallable (const std::string &key="callable") |
Remove a previously added callable object, NOP if it doesn't exist. | |
void | runOnVisualizationThread (VizCallable x, const std::string &key="callable") |
Run a callbable object on the UI thread. Will persist until removed. | |
void | runOnVisualizationThreadOnce (VizCallable x) |
Run a callbable object on the UI thread. This will run once and be removed. | |
void | showCloud (const ColorCloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. | |
void | showCloud (const ColorACloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. | |
void | showCloud (const GrayCloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. | |
void | showCloud (const MonochromeCloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. | |
bool | wasStopped (int millis_to_wait=1) |
Check if the gui was quit, you should quit also. | |
~CloudViewer () | |
Will quit the window, and release all resources held by the viewer. | |
Private Member Functions | |
boost::signals2::connection | registerKeyboardCallback (boost::function< void(const pcl::visualization::KeyboardEvent &)>) |
boost::signals2::connection | registerMouseCallback (boost::function< void(const pcl::visualization::MouseEvent &)>) |
boost::signals2::connection | registerPointPickingCallback (boost::function< void(const pcl::visualization::PointPickingEvent &)>) |
Private Attributes | |
std::auto_ptr< CloudViewer_impl > | impl_ |
Simple point cloud visualization class.
Definition at line 51 of file visualization/include/pcl/visualization/cloud_viewer.h.
Definition at line 54 of file visualization/include/pcl/visualization/cloud_viewer.h.
Definition at line 55 of file visualization/include/pcl/visualization/cloud_viewer.h.
Definition at line 56 of file visualization/include/pcl/visualization/cloud_viewer.h.
Definition at line 57 of file visualization/include/pcl/visualization/cloud_viewer.h.
typedef boost::function1<void, pcl::visualization::PCLVisualizer&> pcl::visualization::CloudViewer::VizCallable |
Visualization callable function, may be used for running things on the UI thread.
Definition at line 108 of file visualization/include/pcl/visualization/cloud_viewer.h.
pcl::visualization::CloudViewer::CloudViewer | ( | const std::string & | window_name | ) |
Construct a cloud viewer, with a window name.
window_name | This is displayed at the top of the window |
Definition at line 263 of file visualization/src/cloud_viewer.cpp.
Will quit the window, and release all resources held by the viewer.
Definition at line 267 of file visualization/src/cloud_viewer.cpp.
boost::signals2::connection pcl::visualization::CloudViewer::registerKeyboardCallback | ( | void(*)(const pcl::visualization::KeyboardEvent &, void *) | callback, |
void * | cookie = NULL |
||
) | [inline] |
Register a callback function for keyboard events.
[in] | callback | the function that will be registered as a callback for a keyboard event |
[in] | cookie | user data that is passed to the callback |
Definition at line 135 of file visualization/include/pcl/visualization/cloud_viewer.h.
boost::signals2::connection pcl::visualization::CloudViewer::registerKeyboardCallback | ( | void(T::*)(const pcl::visualization::KeyboardEvent &, void *) | callback, |
T & | instance, | ||
void * | cookie = NULL |
||
) | [inline] |
Register a callback function for keyboard events.
[in] | callback | the member function that will be registered as a callback for a keyboard event |
[in] | instance | instance to the class that implements the callback function |
[in] | cookie | user data that is passed to the callback |
Definition at line 147 of file visualization/include/pcl/visualization/cloud_viewer.h.
boost::signals2::connection pcl::visualization::CloudViewer::registerKeyboardCallback | ( | boost::function< void(const pcl::visualization::KeyboardEvent &)> | callback | ) | [private] |
Definition at line 344 of file visualization/src/cloud_viewer.cpp.
boost::signals2::connection pcl::visualization::CloudViewer::registerMouseCallback | ( | void(*)(const pcl::visualization::MouseEvent &, void *) | callback, |
void * | cookie = NULL |
||
) | [inline] |
Register a callback function for mouse events.
[in] | callback | the function that will be registered as a callback for a mouse event |
[in] | cookie | user data that is passed to the callback |
Definition at line 158 of file visualization/include/pcl/visualization/cloud_viewer.h.
boost::signals2::connection pcl::visualization::CloudViewer::registerMouseCallback | ( | void(T::*)(const pcl::visualization::MouseEvent &, void *) | callback, |
T & | instance, | ||
void * | cookie = NULL |
||
) | [inline] |
Register a callback function for mouse events.
[in] | callback | the member function that will be registered as a callback for a mouse event |
[in] | instance | instance to the class that implements the callback function |
[in] | cookie | user data that is passed to the callback |
Definition at line 170 of file visualization/include/pcl/visualization/cloud_viewer.h.
boost::signals2::connection pcl::visualization::CloudViewer::registerMouseCallback | ( | boost::function< void(const pcl::visualization::MouseEvent &)> | callback | ) | [private] |
Definition at line 351 of file visualization/src/cloud_viewer.cpp.
boost::signals2::connection pcl::visualization::CloudViewer::registerPointPickingCallback | ( | void(*)(const pcl::visualization::PointPickingEvent &, void *) | callback, |
void * | cookie = NULL |
||
) | [inline] |
Register a callback function for point picking events.
[in] | callback | the function that will be registered as a callback for a point picking event |
[in] | cookie | user data that is passed to the callback |
Definition at line 182 of file visualization/include/pcl/visualization/cloud_viewer.h.
boost::signals2::connection pcl::visualization::CloudViewer::registerPointPickingCallback | ( | void(T::*)(const pcl::visualization::PointPickingEvent &, void *) | callback, |
T & | instance, | ||
void * | cookie = NULL |
||
) | [inline] |
Register a callback function for point picking events.
[in] | callback | the member function that will be registered as a callback for a point picking event |
[in] | instance | instance to the class that implements the callback function |
[in] | cookie | user data that is passed to the callback |
Definition at line 194 of file visualization/include/pcl/visualization/cloud_viewer.h.
boost::signals2::connection pcl::visualization::CloudViewer::registerPointPickingCallback | ( | boost::function< void(const pcl::visualization::PointPickingEvent &)> | callback | ) | [private] |
Definition at line 358 of file visualization/src/cloud_viewer.cpp.
void pcl::visualization::CloudViewer::removeVisualizationCallable | ( | const std::string & | key = "callable" | ) |
Remove a previously added callable object, NOP if it doesn't exist.
key | the key that was registered with the callable object. |
Definition at line 329 of file visualization/src/cloud_viewer.cpp.
void pcl::visualization::CloudViewer::runOnVisualizationThread | ( | VizCallable | x, |
const std::string & | key = "callable" |
||
) |
Run a callbable object on the UI thread. Will persist until removed.
x | Use boost::ref(x) for a function object that you would like to not copy |
key | The key for the callable -- use the same key to overwrite. |
Definition at line 315 of file visualization/src/cloud_viewer.cpp.
Run a callbable object on the UI thread. This will run once and be removed.
x | Use boost::ref(x) for a function object that you would like to not copy |
Definition at line 322 of file visualization/src/cloud_viewer.cpp.
void pcl::visualization::CloudViewer::showCloud | ( | const ColorCloud::ConstPtr & | cloud, |
const std::string & | cloudname = "cloud" |
||
) |
Show a cloud, with an optional key for multiple clouds.
[in] | cloud | RGB point cloud |
[in] | cloudname | a key for the point cloud, use the same name if you would like to overwrite the existing cloud. |
Definition at line 285 of file visualization/src/cloud_viewer.cpp.
void pcl::visualization::CloudViewer::showCloud | ( | const ColorACloud::ConstPtr & | cloud, |
const std::string & | cloudname = "cloud" |
||
) |
Show a cloud, with an optional key for multiple clouds.
[in] | cloud | RGB point cloud |
[in] | cloudname | a key for the point cloud, use the same name if you would like to overwrite the existing cloud. |
Definition at line 275 of file visualization/src/cloud_viewer.cpp.
void pcl::visualization::CloudViewer::showCloud | ( | const GrayCloud::ConstPtr & | cloud, |
const std::string & | cloudname = "cloud" |
||
) |
Show a cloud, with an optional key for multiple clouds.
[in] | cloud | XYZI point cloud |
[in] | cloudname | a key for the point cloud, use the same name if you would like to overwrite the existing cloud. |
Definition at line 295 of file visualization/src/cloud_viewer.cpp.
void pcl::visualization::CloudViewer::showCloud | ( | const MonochromeCloud::ConstPtr & | cloud, |
const std::string & | cloudname = "cloud" |
||
) |
Show a cloud, with an optional key for multiple clouds.
[in] | cloud | XYZ point cloud |
[in] | cloudname | a key for the point cloud, use the same name if you would like to overwrite the existing cloud. |
Definition at line 305 of file visualization/src/cloud_viewer.cpp.
bool pcl::visualization::CloudViewer::wasStopped | ( | int | millis_to_wait = 1 | ) |
Check if the gui was quit, you should quit also.
millis_to_wait | This will request to "spin" for the number of milliseconds, before exiting. |
Definition at line 336 of file visualization/src/cloud_viewer.cpp.
std::auto_ptr<CloudViewer_impl> pcl::visualization::CloudViewer::impl_ [private] |
Definition at line 201 of file visualization/include/pcl/visualization/cloud_viewer.h.