RegistrationVisualizer represents the base class for rendering the intermediate positions ocupied by the source point cloud during it's registration to the target point cloud. A registration algorithm is considered as input and it's covergence is rendered. More...
#include <registration_visualizer.h>
Public Member Functions | |
size_t | getMaximumDisplayedCorrespondences () |
Return maximum number of corresponcence lines which are rendered. | |
RegistrationVisualizer () | |
Empty constructor. | |
void | setMaximumDisplayedCorrespondences (const int maximum_displayed_correspondences) |
Set maximum number of corresponcence lines whch will be rendered. | |
bool | setRegistration (pcl::Registration< PointSource, PointTarget > ®istration) |
Set the registration algorithm whose intermediate steps will be rendered. The method creates the local callback function pcl::RegistrationVisualizer::update_visualizer_ and binds it to the local biffers update function pcl::RegistrationVisualizer::updateIntermediateCloud(). The local callback function pcl::RegistrationVisualizer::update_visualizer_ is then linked to the pcl::Registration::update_visualizer_ callback function. | |
void | startDisplay () |
Start the viewer thread. | |
void | stopDisplay () |
Stop the viewer thread. | |
void | updateIntermediateCloud (const pcl::PointCloud< PointSource > &cloud_src, const std::vector< int > &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const std::vector< int > &indices_tgt) |
Updates visualizer local buffers cloud_intermediate, cloud_intermediate_indices, cloud_target_indices with the newest registration intermediate results. | |
Private Member Functions | |
std::string | getIndexedName (std::string &root_name, size_t &id) |
Return the string obtained by concatenating a root_name and an id. | |
void | runDisplay () |
Initialize and run the visualization loop. This function will be runned in the internal thread viewer_thread_. | |
Private Attributes | |
pcl::PointCloud< PointSource > | cloud_intermediate_ |
The local buffer for intermediate point cloud obtained during registration process. | |
std::vector< int > | cloud_intermediate_indices_ |
The indices of intermediate points used for computation of rigid transformation. | |
pcl::PointCloud< PointSource > | cloud_source_ |
The local buffer for source point cloud. | |
pcl::PointCloud< PointTarget > | cloud_target_ |
The local buffer for target point cloud. | |
std::vector< int > | cloud_target_indices_ |
The indices of target points used for computation of rigid transformation. | |
bool | first_update_flag_ |
Updates source and target point clouds only for the first update call. | |
size_t | maximum_displayed_correspondences_ |
The maximum number of displayed correspondences. | |
std::string | registration_method_name_ |
The name of the registration method whose intermediate results are rendered. | |
boost::function< void(const pcl::PointCloud< PointSource > &cloud_src, const std::vector < int > &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const std::vector < int > &indices_tgt)> | update_visualizer_ |
Callback function linked to pcl::Registration::update_visualizer_. | |
boost::shared_ptr < pcl::visualization::PCLVisualizer > | viewer_ |
The registration viewer. | |
boost::thread | viewer_thread_ |
The thread running the runDisplay() function. | |
boost::mutex | visualizer_updating_mutex_ |
The mutex used for the sincronization of updating and rendering of the local buffers. |
RegistrationVisualizer represents the base class for rendering the intermediate positions ocupied by the source point cloud during it's registration to the target point cloud. A registration algorithm is considered as input and it's covergence is rendered.
Definition at line 55 of file registration_visualizer.h.
pcl::RegistrationVisualizer< PointSource, PointTarget >::RegistrationVisualizer | ( | ) | [inline] |
Empty constructor.
Definition at line 60 of file registration_visualizer.h.
std::string pcl::RegistrationVisualizer< PointSource, PointTarget >::getIndexedName | ( | std::string & | root_name, |
size_t & | id | ||
) | [inline, private] |
Return the string obtained by concatenating a root_name and an id.
Definition at line 159 of file registration_visualizer.h.
size_t pcl::RegistrationVisualizer< PointSource, PointTarget >::getMaximumDisplayedCorrespondences | ( | ) | [inline] |
Return maximum number of corresponcence lines which are rendered.
Definition at line 147 of file registration_visualizer.h.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::runDisplay | ( | ) | [private] |
Initialize and run the visualization loop. This function will be runned in the internal thread viewer_thread_.
Definition at line 57 of file registration_visualizer.hpp.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::setMaximumDisplayedCorrespondences | ( | const int | maximum_displayed_correspondences | ) | [inline] |
Set maximum number of corresponcence lines whch will be rendered.
Definition at line 130 of file registration_visualizer.h.
bool pcl::RegistrationVisualizer< PointSource, PointTarget >::setRegistration | ( | pcl::Registration< PointSource, PointTarget > & | registration | ) | [inline] |
Set the registration algorithm whose intermediate steps will be rendered. The method creates the local callback function pcl::RegistrationVisualizer::update_visualizer_ and binds it to the local biffers update function pcl::RegistrationVisualizer::updateIntermediateCloud(). The local callback function pcl::RegistrationVisualizer::update_visualizer_ is then linked to the pcl::Registration::update_visualizer_ callback function.
registration | represents the registration method whose intermediate steps will be rendered. |
Definition at line 83 of file registration_visualizer.h.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::startDisplay | ( | ) |
Start the viewer thread.
Definition at line 41 of file registration_visualizer.hpp.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::stopDisplay | ( | ) |
Stop the viewer thread.
Definition at line 49 of file registration_visualizer.hpp.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::updateIntermediateCloud | ( | const pcl::PointCloud< PointSource > & | cloud_src, |
const std::vector< int > & | indices_src, | ||
const pcl::PointCloud< PointTarget > & | cloud_tgt, | ||
const std::vector< int > & | indices_tgt | ||
) |
Updates visualizer local buffers cloud_intermediate, cloud_intermediate_indices, cloud_target_indices with the newest registration intermediate results.
cloud_src | represents the initial source point cloud |
indices_src | represents the incices of the intermediate source points used for the estimation of rigid transformation |
cloud_tgt | represents the target point cloud |
indices_tgt | represents the incices of the target points used for the estimation of rigid transformation |
Definition at line 182 of file registration_visualizer.hpp.
pcl::PointCloud<PointSource> pcl::RegistrationVisualizer< PointSource, PointTarget >::cloud_intermediate_ [private] |
The local buffer for intermediate point cloud obtained during registration process.
Definition at line 194 of file registration_visualizer.h.
std::vector<int> pcl::RegistrationVisualizer< PointSource, PointTarget >::cloud_intermediate_indices_ [private] |
The indices of intermediate points used for computation of rigid transformation.
Definition at line 197 of file registration_visualizer.h.
pcl::PointCloud<PointSource> pcl::RegistrationVisualizer< PointSource, PointTarget >::cloud_source_ [private] |
The local buffer for source point cloud.
Definition at line 185 of file registration_visualizer.h.
pcl::PointCloud<PointTarget> pcl::RegistrationVisualizer< PointSource, PointTarget >::cloud_target_ [private] |
The local buffer for target point cloud.
Definition at line 188 of file registration_visualizer.h.
std::vector<int> pcl::RegistrationVisualizer< PointSource, PointTarget >::cloud_target_indices_ [private] |
The indices of target points used for computation of rigid transformation.
Definition at line 200 of file registration_visualizer.h.
bool pcl::RegistrationVisualizer< PointSource, PointTarget >::first_update_flag_ [private] |
Updates source and target point clouds only for the first update call.
Definition at line 182 of file registration_visualizer.h.
size_t pcl::RegistrationVisualizer< PointSource, PointTarget >::maximum_displayed_correspondences_ [private] |
The maximum number of displayed correspondences.
Definition at line 203 of file registration_visualizer.h.
std::string pcl::RegistrationVisualizer< PointSource, PointTarget >::registration_method_name_ [private] |
The name of the registration method whose intermediate results are rendered.
Definition at line 174 of file registration_visualizer.h.
boost::function<void (const pcl::PointCloud<PointSource> &cloud_src, const std::vector<int> &indices_src, const pcl::PointCloud< PointTarget> &cloud_tgt, const std::vector<int> &indices_tgt)> pcl::RegistrationVisualizer< PointSource, PointTarget >::update_visualizer_ [private] |
Callback function linked to pcl::Registration::update_visualizer_.
Definition at line 179 of file registration_visualizer.h.
boost::shared_ptr<pcl::visualization::PCLVisualizer> pcl::RegistrationVisualizer< PointSource, PointTarget >::viewer_ [private] |
The registration viewer.
Definition at line 168 of file registration_visualizer.h.
boost::thread pcl::RegistrationVisualizer< PointSource, PointTarget >::viewer_thread_ [private] |
The thread running the runDisplay() function.
Definition at line 171 of file registration_visualizer.h.
boost::mutex pcl::RegistrationVisualizer< PointSource, PointTarget >::visualizer_updating_mutex_ [private] |
The mutex used for the sincronization of updating and rendering of the local buffers.
Definition at line 191 of file registration_visualizer.h.