41#include <pcl/registration/registration.h>
42#include <pcl/visualization/pcl_visualizer.h>
56 template<
typename Po
intSource,
typename Po
intTarget,
typename Scalar =
float>
63 update_visualizer_ (),
66 cloud_intermediate_ ()
97 visualizer_updating_mutex_.lock ();
99 first_update_flag_ =
false;
101 visualizer_updating_mutex_.unlock ();
138 visualizer_updating_mutex_.lock ();
141 maximum_displayed_correspondences_ = maximum_displayed_correspondences;
144 visualizer_updating_mutex_.unlock();
151 return maximum_displayed_correspondences_;
161 getIndexedName (std::string &root_name, std::size_t &
id)
163 return root_name + std::to_string(
id);
170 std::thread viewer_thread_;
173 std::string registration_method_name_;
178 PointTarget> &cloud_tgt,
const pcl::Indices &indices_tgt)> update_visualizer_;
181 bool first_update_flag_{
false};
190 std::mutex visualizer_updating_mutex_;
202 std::size_t maximum_displayed_correspondences_{0};
207#include <pcl/visualization/impl/registration_visualizer.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
Registration represents the base registration class for general purpose, ICP-like methods.
bool registerVisualizationCallback(std::function< UpdateVisualizerCallbackSignature > &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 represents the base class for rendering the intermediate positions occupied by...
void setMaximumDisplayedCorrespondences(const int maximum_displayed_correspondences)
Set maximum number of correspondence lines which will be rendered.
RegistrationVisualizer()
Empty constructor.
void stopDisplay()
Stop the viewer thread.
bool setRegistration(pcl::Registration< PointSource, PointTarget, Scalar > ®istration)
Set the registration algorithm whose intermediate steps will be rendered.
~RegistrationVisualizer()
std::size_t getMaximumDisplayedCorrespondences()
Return maximum number of correspondence lines which are rendered.
void startDisplay()
Start the viewer thread.
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...
shared_ptr< PCLVisualizer > Ptr
IndicesAllocator<> Indices
Type used for indices in PCL.