Simple point cloud visualization class. More...
#include <pcl/visualization/cloud_viewer.h>
Public Types | |
using | Ptr = shared_ptr< CloudViewer > |
using | ConstPtr = shared_ptr< const CloudViewer > |
using | ColorACloud = pcl::PointCloud< pcl::PointXYZRGBA > |
using | ColorCloud = pcl::PointCloud< pcl::PointXYZRGB > |
using | GrayCloud = pcl::PointCloud< pcl::PointXYZI > |
using | MonochromeCloud = pcl::PointCloud< pcl::PointXYZ > |
using | VizCallable = std::function< void(pcl::visualization::PCLVisualizer &)> |
Visualization callable function, may be used for running things on the UI thread. More... |
|
Public Member Functions | |
CloudViewer (const std::string &window_name) | |
Construct a cloud viewer, with a window name. More... |
|
~CloudViewer () | |
Will quit the window, and release all resources held by the viewer. More... |
|
void | showCloud (const ColorCloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. More... |
|
void | showCloud (const ColorACloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. More... |
|
void | showCloud (const GrayCloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. More... |
|
void | showCloud (const MonochromeCloud::ConstPtr &cloud, const std::string &cloudname="cloud") |
Show a cloud, with an optional key for multiple clouds. More... |
|
bool | wasStopped (int millis_to_wait=1) |
Check if the gui was quit, you should quit also. More... |
|
void | runOnVisualizationThread (VizCallable x, const std::string &key="callable") |
Run a callbable object on the UI thread. More... |
|
void | runOnVisualizationThreadOnce (VizCallable x) |
Run a callbable object on the UI thread. More... |
|
void | removeVisualizationCallable (const std::string &key="callable") |
Remove a previously added callable object, NOP if it doesn't exist. More... |
|
boost::signals2::connection | registerKeyboardCallback (void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=nullptr) |
Register a callback function for keyboard events. More... |
|
template<typename T > | |
boost::signals2::connection | registerKeyboardCallback (void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=nullptr) |
Register a callback function for keyboard events. More... |
|
boost::signals2::connection | registerMouseCallback (void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=nullptr) |
Register a callback function for mouse events. More... |
|
template<typename T > | |
boost::signals2::connection | registerMouseCallback (void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=nullptr) |
Register a callback function for mouse events. More... |
|
boost::signals2::connection | registerPointPickingCallback (void(*callback)(const pcl::visualization::PointPickingEvent &, void *), void *cookie=nullptr) |
Register a callback function for point picking events. More... |
|
template<typename T > | |
boost::signals2::connection | registerPointPickingCallback (void(T::*callback)(const pcl::visualization::PointPickingEvent &, void *), T &instance, void *cookie=nullptr) |
Register a callback function for point picking events. More... |
|
Simple point cloud visualization class.
Definition at line 52 of file cloud_viewer.h.
Definition at line 58 of file cloud_viewer.h.
Definition at line 59 of file cloud_viewer.h.
using pcl::visualization::CloudViewer::ConstPtr = shared_ptr<const CloudViewer> |
Definition at line 56 of file cloud_viewer.h.
Definition at line 60 of file cloud_viewer.h.
Definition at line 61 of file cloud_viewer.h.
using pcl::visualization::CloudViewer::Ptr = shared_ptr<CloudViewer> |
Definition at line 55 of file cloud_viewer.h.
using pcl::visualization::CloudViewer::VizCallable = std::function<void (pcl::visualization::PCLVisualizer&)> |
Visualization callable function, may be used for running things on the UI thread.
Definition at line 112 of file 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 |
pcl::visualization::CloudViewer::~CloudViewer | ( | ) |
Will quit the window, and release all resources held by the viewer.
| 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 139 of file cloud_viewer.h.
| 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 151 of file cloud_viewer.h.
| 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 162 of file cloud_viewer.h.
| 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 174 of file cloud_viewer.h.
| 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 186 of file cloud_viewer.h.
| 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 198 of file cloud_viewer.h.
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. |
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. |
void pcl::visualization::CloudViewer::runOnVisualizationThreadOnce | ( | VizCallable | x | ) |
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 |
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. |
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. |
Referenced by pcl::gpu::DataSource::runCloudViewer().
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. |
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. |
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. |
Referenced by pcl::gpu::DataSource::runCloudViewer().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1visualization_1_1_cloud_viewer.html