39 #ifndef PCL_REGISTRATION_CORRESPONDENCE_REJECTION_SURFACE_NORMAL_H_
40 #define PCL_REGISTRATION_CORRESPONDENCE_REJECTION_SURFACE_NORMAL_H_
42 #include <pcl/registration/correspondence_rejection.h>
43 #include <pcl/point_cloud.h>
47 namespace registration
67 typedef boost::shared_ptr<CorrespondenceRejectorSurfaceNormal>
Ptr;
68 typedef boost::shared_ptr<const CorrespondenceRejectorSurfaceNormal>
ConstPtr;
75 rejection_name_ =
"CorrespondenceRejectorSurfaceNormal";
97 template <
typename Po
intT,
typename NormalT>
inline void
106 template <
typename Po
intT>
inline void
109 PCL_WARN (
"[pcl::registration::%s::setInputCloud] setInputCloud is deprecated. Please use setInputSource instead.\n", getClassName ().c_str ());
110 if (!data_container_)
112 PCL_ERROR (
"[pcl::registration::%s::setInputCloud] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
121 template <
typename Po
intT>
inline void
124 if (!data_container_)
126 PCL_ERROR (
"[pcl::registration::%s::setInputCloud] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
136 if (!data_container_)
138 PCL_ERROR (
"[pcl::registration::%s::getInputSource] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
147 template <
typename Po
intT>
inline void
150 if (!data_container_)
152 PCL_ERROR (
"[pcl::registration::%s::setInputTarget] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
165 template <
typename Po
intT>
inline void
167 bool force_no_recompute =
false)
170 (data_container_)->setSearchMethodTarget (tree, force_no_recompute );
177 if (!data_container_)
179 PCL_ERROR (
"[pcl::registration::%s::getInputTarget] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
188 template <
typename Po
intT,
typename NormalT>
inline void
191 if (!data_container_)
193 PCL_ERROR (
"[pcl::registration::%s::setInputNormals] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
203 if (!data_container_)
205 PCL_ERROR (
"[pcl::registration::%s::getInputNormals] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
214 template <
typename Po
intT,
typename NormalT>
inline void
217 if (!data_container_)
219 PCL_ERROR (
"[pcl::registration::%s::setTargetNormals] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
229 if (!data_container_)
231 PCL_ERROR (
"[pcl::registration::%s::getTargetNormals] Initialize the data container object by calling intializeDataContainer () before using this function.\n", getClassName ().c_str ());
245 getRemainingCorrespondences (*input_correspondences_, correspondences);
258 #include <pcl/registration/impl/correspondence_rejection_surface_normal.hpp>
boost::shared_ptr< CorrespondenceRejectorSurfaceNormal > Ptr
void setInputSource(const typename pcl::PointCloud< PointT >::ConstPtr &input)
Provide a source point cloud dataset (must contain XYZ data!), used to compute the correspondence dis...
void setInputCloud(const typename pcl::PointCloud< PointT >::ConstPtr &input)
Provide a source point cloud dataset (must contain XYZ data!), used to compute the correspondence dis...
void setTargetNormals(const typename pcl::PointCloud< NormalT >::ConstPtr &normals)
Set the normals computed on the target point cloud.
CorrespondencesConstPtr input_correspondences_
The input correspondences.
void setSearchMethodTarget(const boost::shared_ptr< pcl::search::KdTree< PointT > > &tree, bool force_no_recompute=false)
Provide a pointer to the search object used to find correspondences in the target cloud...
CorrespondenceRejector represents the base class for correspondence rejection methods ...
CorrespondenceRejectorSurfaceNormal()
Empty constructor.
double threshold_
The median distance threshold between two correspondent points in source <-> target.
CorrespondenceRejectorSurfaceNormal implements a simple correspondence rejection method based on the ...
boost::shared_ptr< DataContainerInterface > DataContainerPtr
pcl::PointCloud< PointT >::ConstPtr getInputSource() const
Get the target input point cloud.
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
pcl::PointCloud< NormalT >::Ptr getTargetNormals() const
Get the normals computed on the target point cloud.
boost::shared_ptr< PointCloud< PointT > > Ptr
const std::string & getClassName() const
Get a string representation of the name of this class.
boost::shared_ptr< const CorrespondenceRejectorSurfaceNormal > ConstPtr
void initializeDataContainer()
Initialize the data container object for the point type and the normal type.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
pcl::PointCloud< NormalT >::Ptr getInputNormals() const
Get the normals computed on the input point cloud.
void applyRejection(pcl::Correspondences &correspondences)
Apply the rejection algorithm.
std::vector< pcl::Correspondence, Eigen::aligned_allocator< pcl::Correspondence > > Correspondences
void setThreshold(double threshold)
Set the thresholding angle between the normals for correspondence rejection.
pcl::PointCloud< PointT >::ConstPtr getInputTarget() const
Get the target input point cloud.
DataContainerPtr data_container_
A pointer to the DataContainer object containing the input and target point clouds.
double getThreshold() const
Get the thresholding angle between the normals for correspondence rejection.
void setInputTarget(const typename pcl::PointCloud< PointT >::ConstPtr &target)
Provide a target point cloud dataset (must contain XYZ data!), used to compute the correspondence dis...
void setInputNormals(const typename pcl::PointCloud< NormalT >::ConstPtr &normals)
Set the normals computed on the input point cloud.
DataContainer is a container for the input and target point clouds and implements the interface to co...
std::string rejection_name_
The name of the rejection method.