41 #include <pcl/registration/registration.h>
42 #include <pcl/visualization/pcl_visualizer.h>
56 template<
typename Po
intSource,
typename Po
intTarget>
63 update_visualizer_ (),
64 first_update_flag_ (),
67 cloud_intermediate_ (),
68 maximum_displayed_correspondences_ (0)
97 visualizer_updating_mutex_.lock ();
99 first_update_flag_ =
false;
101 visualizer_updating_mutex_.unlock ();
135 visualizer_updating_mutex_.lock ();
138 maximum_displayed_correspondences_ = maximum_displayed_correspondences;
141 visualizer_updating_mutex_.unlock();
148 return maximum_displayed_correspondences_;
158 getIndexedName (std::string &root_name, std::size_t &
id)
160 std::stringstream id_stream_;
162 std::string indexed_name_ = root_name + id_stream_.str ();
163 return indexed_name_;
170 std::thread viewer_thread_;
173 std::string registration_method_name_;
178 PointTarget> &cloud_tgt,
const std::vector<int> &indices_tgt)> update_visualizer_;
181 bool first_update_flag_;
190 std::mutex visualizer_updating_mutex_;
196 std::vector<int> cloud_intermediate_indices_;
199 std::vector<int> cloud_target_indices_;
202 std::size_t maximum_displayed_correspondences_;
207 #include <pcl/visualization/impl/registration_visualizer.hpp>
std::size_t getMaximumDisplayedCorrespondences()
Return maximum number of correspondence lines which are rendered.
void startDisplay()
Start the viewer thread.
void stopDisplay()
Stop the viewer thread.
const std::string & getClassName() const
Abstract class get name method.
bool setRegistration(pcl::Registration< PointSource, PointTarget > ®istration)
Set the registration algorithm whose intermediate steps will be rendered.
shared_ptr< PCLVisualizer > Ptr
RegistrationVisualizer()
Empty constructor.
void setMaximumDisplayedCorrespondences(const int maximum_displayed_correspondences)
Set maximum number of correspondence lines which will be rendered.
bool registerVisualizationCallback(std::function< UpdateVisualizerCallbackSignature > &visualizerCallback)
Register the user callback function which will be called from registration thread in order to update ...
RegistrationVisualizer represents the base class for rendering the intermediate positions occupied 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...