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 60 of file registration_visualizer.h.
pcl::RegistrationVisualizer< PointSource, PointTarget >::RegistrationVisualizer | ( | ) | [inline] |
Empty constructor.
Definition at line 65 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 164 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 152 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 56 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 135 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 88 of file registration_visualizer.h.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::startDisplay | ( | ) |
Start the viewer thread.
Definition at line 40 of file registration_visualizer.hpp.
void pcl::RegistrationVisualizer< PointSource, PointTarget >::stopDisplay | ( | ) |
Stop the viewer thread.
Definition at line 48 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 181 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 199 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 202 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 190 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 193 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 205 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 187 of file registration_visualizer.h.
size_t pcl::RegistrationVisualizer< PointSource, PointTarget >::maximum_displayed_correspondences_ [private] |
The maximum number of displayed correspondences.
Definition at line 208 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 179 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 184 of file registration_visualizer.h.
boost::shared_ptr<pcl::visualization::PCLVisualizer> pcl::RegistrationVisualizer< PointSource, PointTarget >::viewer_ [private] |
The registration viewer.
Definition at line 173 of file registration_visualizer.h.
boost::thread pcl::RegistrationVisualizer< PointSource, PointTarget >::viewer_thread_ [private] |
The thread running the runDisplay() function.
Definition at line 176 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 196 of file registration_visualizer.h.