PCL histogram visualizer main class. More...
#include <pcl/visualization/histogram_visualizer.h>
Public Types | |
using | Ptr = shared_ptr< PCLHistogramVisualizer > |
using | ConstPtr = shared_ptr< const PCLHistogramVisualizer > |
Public Member Functions | |
PCLHistogramVisualizer () | |
PCL histogram visualizer constructor. More... |
|
virtual | ~PCLHistogramVisualizer () |
void | spinOnce (int time=1) |
Spin once method. More... |
|
void | spin () |
Spin method. More... |
|
void | setBackgroundColor (const double &r, const double &g, const double &b) |
Set the viewport's background color. More... |
|
template<typename PointT > | |
bool | addFeatureHistogram (const pcl::PointCloud< PointT > &cloud, int hsize, const std::string &id="cloud", int win_width=640, int win_height=200) |
Add a histogram feature to screen as a separate window, from a cloud containing a single histogram. More... |
|
bool | addFeatureHistogram (const pcl::PCLPointCloud2 &cloud, const std::string &field_name, const std::string &id="cloud", int win_width=640, int win_height=200) |
Add a histogram feature to screen as a separate window from a cloud containing a single histogram. More... |
|
template<typename PointT > | |
bool | addFeatureHistogram (const pcl::PointCloud< PointT > &cloud, const std::string &field_name, const pcl::index_t index, const std::string &id="cloud", int win_width=640, int win_height=200) |
Add a histogram feature to screen as a separate window. More... |
|
bool | addFeatureHistogram (const pcl::PCLPointCloud2 &cloud, const std::string &field_name, const pcl::index_t index, const std::string &id="cloud", int win_width=640, int win_height=200) |
Add a histogram feature to screen as a separate window. More... |
|
template<typename PointT > | |
bool | updateFeatureHistogram (const pcl::PointCloud< PointT > &cloud, int hsize, const std::string &id="cloud") |
Update a histogram feature that is already on screen, with a cloud containing a single histogram. More... |
|
bool | updateFeatureHistogram (const pcl::PCLPointCloud2 &cloud, const std::string &field_name, const std::string &id="cloud") |
Update a histogram feature that is already on screen, with a cloud containing a single histogram. More... |
|
template<typename PointT > | |
bool | updateFeatureHistogram (const pcl::PointCloud< PointT > &cloud, const std::string &field_name, const pcl::index_t index, const std::string &id="cloud") |
Update a histogram feature that is already on screen, with a cloud containing a single histogram. More... |
|
bool | updateFeatureHistogram (const pcl::PCLPointCloud2 &cloud, const std::string &field_name, const pcl::index_t index, const std::string &id="cloud") |
Update a histogram feature that is already on screen, with a cloud containing a single histogram. More... |
|
void | setGlobalYRange (float minp, float maxp) |
Set the Y range to minp-maxp for all histograms. More... |
|
void | updateWindowPositions () |
Update all window positions on screen so that they fit. More... |
|
Protected Member Functions | |
void | createActor (const vtkSmartPointer< vtkDoubleArray > &xy_array, RenWinInteract &renwinint, const std::string &id, const int win_width, const int win_height) |
Create a 2D actor from the given vtkDoubleArray histogram and add it to the screen. More... |
|
void | reCreateActor (const vtkSmartPointer< vtkDoubleArray > &xy_array, RenWinInteract *renwinupd, const int hsize) |
Remove the current 2d actor and create a new 2D actor from the given vtkDoubleArray histogram and add it to the screen. More... |
|
PCL histogram visualizer main class.
Definition at line 56 of file histogram_visualizer.h.
using pcl::visualization::PCLHistogramVisualizer::ConstPtr = shared_ptr<const PCLHistogramVisualizer> |
Definition at line 60 of file histogram_visualizer.h.
using pcl::visualization::PCLHistogramVisualizer::Ptr = shared_ptr<PCLHistogramVisualizer> |
Definition at line 59 of file histogram_visualizer.h.
pcl::visualization::PCLHistogramVisualizer::PCLHistogramVisualizer | ( | ) |
PCL histogram visualizer constructor.
| inlinevirtual |
Definition at line 65 of file histogram_visualizer.h.
bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram | ( | const pcl::PCLPointCloud2 & | cloud, |
const std::string & | field_name, | ||
const pcl::index_t | index, | ||
const std::string & |
id = "cloud" , | ||
int |
win_width = 640 , | ||
int |
win_height = 200 | ||
) |
Add a histogram feature to screen as a separate window.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | field_name | the field name containing the histogram |
[in] | index | the point index to extract the histogram from |
[in] | id | the point cloud object id (default: cloud) |
[in] | win_width | the width of the window |
[in] | win_height | the height of the window |
bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram | ( | const pcl::PCLPointCloud2 & | cloud, |
const std::string & | field_name, | ||
const std::string & |
id = "cloud" , | ||
int |
win_width = 640 , | ||
int |
win_height = 200 | ||
) |
Add a histogram feature to screen as a separate window from a cloud containing a single histogram.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | field_name | the field name containing the histogram |
[in] | id | the point cloud object id (default: cloud) |
[in] | win_width | the width of the window |
[in] | win_height | the height of the window |
bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram | ( | const pcl::PointCloud< PointT > & | cloud, |
const std::string & | field_name, | ||
const pcl::index_t | index, | ||
const std::string & |
id = "cloud" , | ||
int |
win_width = 640 , | ||
int |
win_height = 200 | ||
) |
Add a histogram feature to screen as a separate window.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | field_name | the field name containing the histogram |
[in] | index | the point index to extract the histogram from |
[in] | id | the point cloud object id (default: cloud) |
[in] | win_width | the width of the window |
[in] | win_height | the height of the window |
Definition at line 86 of file histogram_visualizer.hpp.
References createActor(), and pcl::PointCloud< PointT >::size().
bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram | ( | const pcl::PointCloud< PointT > & | cloud, |
int | hsize, | ||
const std::string & |
id = "cloud" , | ||
int |
win_width = 640 , | ||
int |
win_height = 200 | ||
) |
Add a histogram feature to screen as a separate window, from a cloud containing a single histogram.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | hsize | the length of the histogram |
[in] | id | the point cloud object id (default: cloud) |
[in] | win_width | the width of the window |
[in] | win_height | the height of the window |
Definition at line 52 of file histogram_visualizer.hpp.
References createActor().
| protected |
Create a 2D actor from the given vtkDoubleArray histogram and add it to the screen.
[in] | xy_array | the input vtkDoubleArray holding the histogram data |
[out] | renwinint | the resultant render window interactor holding the rendered object |
[in] | id | the point cloud object id |
[in] | win_width | the width of the window |
[in] | win_height | the height of the window |
Referenced by addFeatureHistogram().
| protected |
Remove the current 2d actor and create a new 2D actor from the given vtkDoubleArray histogram and add it to the screen.
[in] | xy_array | the input vtkDoubleArray holding the histogram data |
[out] | renwinupd | the resultant render window interactor holding the rendered object |
[in] | hsize | Histogram size |
Referenced by updateFeatureHistogram().
void pcl::visualization::PCLHistogramVisualizer::setBackgroundColor | ( | const double & | r, |
const double & | g, | ||
const double & | b | ||
) |
void pcl::visualization::PCLHistogramVisualizer::setGlobalYRange | ( | float | minp, |
float | maxp | ||
) |
Set the Y range to minp-maxp for all histograms.
[in] | minp | the minimum Y range |
[in] | maxp | the maximum Y range |
void pcl::visualization::PCLHistogramVisualizer::spin | ( | ) |
Spin method.
Calls the interactor and runs an internal loop.
void pcl::visualization::PCLHistogramVisualizer::spinOnce | ( | int |
time = 1
|
) |
Spin once method.
Calls the interactor and updates the screen once.
[in] | time | - How long (in ms) should the visualization loop be allowed to run. |
bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram | ( | const pcl::PCLPointCloud2 & | cloud, |
const std::string & | field_name, | ||
const pcl::index_t | index, | ||
const std::string & |
id = "cloud" | ||
) |
Update a histogram feature that is already on screen, with a cloud containing a single histogram.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | field_name | the field name containing the histogram |
[in] | index | the point index to extract the histogram from |
[in] | id | the point cloud object id (default: cloud) |
bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram | ( | const pcl::PCLPointCloud2 & | cloud, |
const std::string & | field_name, | ||
const std::string & |
id = "cloud" | ||
) |
Update a histogram feature that is already on screen, with a cloud containing a single histogram.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | field_name | the field name containing the histogram |
[in] | id | the point cloud object id (default: cloud) |
bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram | ( | const pcl::PointCloud< PointT > & | cloud, |
const std::string & | field_name, | ||
const pcl::index_t | index, | ||
const std::string & |
id = "cloud" | ||
) |
Update a histogram feature that is already on screen, with a cloud containing a single histogram.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | field_name | the field name containing the histogram |
[in] | index | the point index to extract the histogram from |
[in] | id | the point cloud object id (default: cloud) |
Definition at line 170 of file histogram_visualizer.hpp.
References reCreateActor(), and pcl::PointCloud< PointT >::size().
bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram | ( | const pcl::PointCloud< PointT > & | cloud, |
int | hsize, | ||
const std::string & |
id = "cloud" | ||
) |
Update a histogram feature that is already on screen, with a cloud containing a single histogram.
[in] | cloud | the PointCloud dataset containing the histogram |
[in] | hsize | the length of the histogram |
[in] | id | the point cloud object id (default: cloud) |
Definition at line 140 of file histogram_visualizer.hpp.
References reCreateActor().
void pcl::visualization::PCLHistogramVisualizer::updateWindowPositions | ( | ) |
Update all window positions on screen so that they fit.
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1visualization_1_1_p_c_l_histogram_visualizer.html