38 #ifndef PCL_REGISTRATION_VISUALIZER_H_
39 #define PCL_REGISTRATION_VISUALIZER_H_
42 #include <pcl/registration/registration.h>
43 #include <pcl/visualization/pcl_visualizer.h>
54 template<
typename Po
intSource,
typename Po
intTarget>
63 registration_method_name_ (),
64 update_visualizer_ (),
65 first_update_flag_ (),
68 visualizer_updating_mutex_ (),
69 cloud_intermediate_ (),
70 cloud_intermediate_indices_ (),
71 cloud_target_indices_ (),
72 maximum_displayed_correspondences_ (0)
91 this, _1, _2, _3, _4);
98 visualizer_updating_mutex_.lock ();
100 first_update_flag_ =
false;
102 visualizer_updating_mutex_.unlock ();
136 visualizer_updating_mutex_.lock ();
139 maximum_displayed_correspondences_ = maximum_displayed_correspondences;
142 visualizer_updating_mutex_.unlock();
149 return maximum_displayed_correspondences_;
159 getIndexedName (std::string &root_name,
size_t &
id)
161 std::stringstream id_stream_;
163 std::string indexed_name_ = root_name + id_stream_.str ();
164 return indexed_name_;
168 boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer_;
171 boost::thread viewer_thread_;
174 std::string registration_method_name_;
179 PointTarget> &cloud_tgt,
const std::vector<int> &indices_tgt)> update_visualizer_;
182 bool first_update_flag_;
191 boost::mutex visualizer_updating_mutex_;
197 std::vector<int> cloud_intermediate_indices_;
200 std::vector<int> cloud_target_indices_;
203 size_t maximum_displayed_correspondences_;
208 #include <pcl/visualization/impl/registration_visualizer.hpp>
210 #endif //#ifndef PCL_REGISTRATION_VISUALIZER_H_
bool registerVisualizationCallback(boost::function< FunctionSignature > &visualizerCallback)
Register the user callback function which will be called from registration thread in order to update ...
const std::string & getClassName() const
Abstract class get name method.
RegistrationVisualizer()
Empty constructor.
void startDisplay()
Start the viewer thread.
bool setRegistration(pcl::Registration< PointSource, PointTarget > ®istration)
Set the registration algorithm whose intermediate steps will be rendered.
void setMaximumDisplayedCorrespondences(const int maximum_displayed_correspondences)
Set maximum number of corresponcence lines whch will be rendered.
size_t getMaximumDisplayedCorrespondences()
Return maximum number of corresponcence lines which are rendered.
void stopDisplay()
Stop the viewer thread.
RegistrationVisualizer represents the base class for rendering the intermediate positions ocupied by ...
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...