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 return root_name + std::to_string(
id);
167 std::thread viewer_thread_;
170 std::string registration_method_name_;
175 PointTarget> &cloud_tgt,
const pcl::Indices &indices_tgt)> update_visualizer_;
178 bool first_update_flag_;
187 std::mutex visualizer_updating_mutex_;
199 std::size_t maximum_displayed_correspondences_;
204 #include <pcl/visualization/impl/registration_visualizer.hpp>
Registration represents the base registration class for general purpose, ICP-like methods.
const std::string & getClassName() const
Abstract class get name method.
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 pcl::Indices &indices_src, const pcl::PointCloud< PointTarget > &cloud_tgt, const pcl::Indices &indices_tgt)
Updates visualizer local buffers cloud_intermediate, cloud_intermediate_indices, cloud_target_indices...
std::size_t getMaximumDisplayedCorrespondences()
Return maximum number of correspondence lines which are rendered.
void setMaximumDisplayedCorrespondences(const int maximum_displayed_correspondences)
Set maximum number of correspondence lines which will be rendered.
bool setRegistration(pcl::Registration< PointSource, PointTarget > ®istration)
Set the registration algorithm whose intermediate steps will be rendered.
void startDisplay()
Start the viewer thread.
void stopDisplay()
Stop the viewer thread.
RegistrationVisualizer()
Empty constructor.
shared_ptr< PCLVisualizer > Ptr
IndicesAllocator<> Indices
Type used for indices in PCL.