Point Cloud Library (PCL)  1.9.1-dev
List of all members | Classes | Public Member Functions | Protected Member Functions
pcl::visualization::PCLHistogramVisualizer Class Reference

PCL histogram visualizer main class. More...

#include <pcl/visualization/histogram_visualizer.h>

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 int 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 int 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 int 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 int 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...
 

Detailed Description

PCL histogram visualizer main class.

Author
Radu Bogdan Rusu

Definition at line 56 of file histogram_visualizer.h.

Constructor & Destructor Documentation

pcl::visualization::PCLHistogramVisualizer::PCLHistogramVisualizer ( )

PCL histogram visualizer constructor.

virtual pcl::visualization::PCLHistogramVisualizer::~PCLHistogramVisualizer ( )
inlinevirtual

Definition at line 62 of file histogram_visualizer.h.

Member Function Documentation

template<typename PointT >
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.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]hsizethe length of the histogram
[in]idthe point cloud object id (default: cloud)
[in]win_widththe width of the window
[in]win_heightthe height of the window

Definition at line 46 of file histogram_visualizer.hpp.

References createActor(), and pcl::PointCloud< PointT >::points.

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.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]field_namethe field name containing the histogram
[in]idthe point cloud object id (default: cloud)
[in]win_widththe width of the window
[in]win_heightthe height of the window
template<typename PointT >
bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram ( const pcl::PointCloud< PointT > &  cloud,
const std::string &  field_name,
const int  index,
const std::string &  id = "cloud",
int  win_width = 640,
int  win_height = 200 
)

Add a histogram feature to screen as a separate window.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]field_namethe field name containing the histogram
[in]indexthe point index to extract the histogram from
[in]idthe point cloud object id (default: cloud)
[in]win_widththe width of the window
[in]win_heightthe height of the window

Definition at line 80 of file histogram_visualizer.hpp.

References createActor(), and pcl::PointCloud< PointT >::points.

bool pcl::visualization::PCLHistogramVisualizer::addFeatureHistogram ( const pcl::PCLPointCloud2 cloud,
const std::string &  field_name,
const int  index,
const std::string &  id = "cloud",
int  win_width = 640,
int  win_height = 200 
)

Add a histogram feature to screen as a separate window.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]field_namethe field name containing the histogram
[in]indexthe point index to extract the histogram from
[in]idthe point cloud object id (default: cloud)
[in]win_widththe width of the window
[in]win_heightthe height of the window
void pcl::visualization::PCLHistogramVisualizer::createActor ( const vtkSmartPointer< vtkDoubleArray > &  xy_array,
RenWinInteract renwinint,
const std::string &  id,
const int  win_width,
const int  win_height 
)
protected

Create a 2D actor from the given vtkDoubleArray histogram and add it to the screen.

Parameters
[in]xy_arraythe input vtkDoubleArray holding the histogram data
[out]renwinintthe resultant render window interactor holding the rendered object
[in]idthe point cloud object id
[in]win_widththe width of the window
[in]win_heightthe height of the window

Referenced by addFeatureHistogram().

void pcl::visualization::PCLHistogramVisualizer::reCreateActor ( const vtkSmartPointer< vtkDoubleArray > &  xy_array,
RenWinInteract renwinupd,
const int  hsize 
)
protected

Remove the current 2d actor and create a new 2D actor from the given vtkDoubleArray histogram and add it to the screen.

Parameters
[in]xy_arraythe input vtkDoubleArray holding the histogram data
[out]renwinupdthe resultant render window interactor holding the rendered object
[in]hsizeHistogram size

Referenced by updateFeatureHistogram().

void pcl::visualization::PCLHistogramVisualizer::setBackgroundColor ( const double &  r,
const double &  g,
const double &  b 
)

Set the viewport's background color.

Parameters
[in]rthe red component of the RGB color
[in]gthe green component of the RGB color
[in]bthe blue component of the RGB color
void pcl::visualization::PCLHistogramVisualizer::setGlobalYRange ( float  minp,
float  maxp 
)

Set the Y range to minp-maxp for all histograms.

Parameters
[in]minpthe minimum Y range
[in]maxpthe 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.

Parameters
[in]time- How long (in ms) should the visualization loop be allowed to run.
template<typename PointT >
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.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]hsizethe length of the histogram
[in]idthe point cloud object id (default: cloud)

Definition at line 134 of file histogram_visualizer.hpp.

References pcl::PointCloud< PointT >::points, and reCreateActor().

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.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]field_namethe field name containing the histogram
[in]idthe point cloud object id (default: cloud)
template<typename PointT >
bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram ( const pcl::PointCloud< PointT > &  cloud,
const std::string &  field_name,
const int  index,
const std::string &  id = "cloud" 
)

Update a histogram feature that is already on screen, with a cloud containing a single histogram.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]field_namethe field name containing the histogram
[in]indexthe point index to extract the histogram from
[in]idthe point cloud object id (default: cloud)

Definition at line 164 of file histogram_visualizer.hpp.

References pcl::PointCloud< PointT >::points, and reCreateActor().

bool pcl::visualization::PCLHistogramVisualizer::updateFeatureHistogram ( const pcl::PCLPointCloud2 cloud,
const std::string &  field_name,
const int  index,
const std::string &  id = "cloud" 
)

Update a histogram feature that is already on screen, with a cloud containing a single histogram.

Parameters
[in]cloudthe PointCloud dataset containing the histogram
[in]field_namethe field name containing the histogram
[in]indexthe point index to extract the histogram from
[in]idthe point cloud object id (default: cloud)
void pcl::visualization::PCLHistogramVisualizer::updateWindowPositions ( )

Update all window positions on screen so that they fit.


The documentation for this class was generated from the following files: