Correct setting of is_dense flag in SegmentDifferences. Deprecate unused parameter in method. - #2380
Conversation
Flag must be set after copyPointCloud, otherwise it will be overwritten. Remove unused parameter tgt and redundant copying of attributes.
|
All makes sense to me, thanks. However we'll need to keep around the old function signature and add a depreciation warning. Something like this: template <typename PointT>
PCL_DEPRECATED ("getPointCloudDifferences() does not use the tgt parameter, thus it is
deprecated and will be removed in future releases.")
inline void getPointCloudDifference (
const pcl::PointCloud<PointT> &src, const pcl::PointCloud<PointT> &tgt,
double threshold, const boost::shared_ptr<pcl::search::Search<PointT> > &tree,
pcl::PointCloud<PointT> &output)
{
getPointCloudDifferences<PointT> (src, pcl::PointCloud<PointT> (), threshold, tree, output);
} |
|
Hi Sergey, I have made the changes you requested, it's now possible again to call the function with the old signature. I cannot see the deprecated warning with my GCC 4.9 and VS 2015 compilers however. We use the same macro and it stopped working when changing from VS 2010 to 2015. |
|
Thanks. I experimented with deprecation warnings last month on GCC 5.5; it worked. So at least some users will see them. |
| { | ||
| getPointCloudDifference<PointT> (src, pcl::PointCloud<PointT>(), threshold, tree, output); | ||
| } | ||
|
|
There was a problem hiding this comment.
Sorry to rock the boat this late. Isn't the idea behind this deprecation accept the extra tgt parameter but invoke the version without it like shown below?
template <typename PointT>
PCL_DEPRECATED("getPointCloudDifference() does not use the tgt parameter, thus it is deprecated and will be removed in future releases.")
inline void getPointCloudDifference (
const pcl::PointCloud<PointT> &src,
const pcl::PointCloud<PointT> &, // removed parameter to suppress warning
double threshold,
const boost::shared_ptr<pcl::search::Search<PointT> > &tree,
pcl::PointCloud<PointT> &output)
{
getPointCloudDifference<PointT> (src, threshold, tree, output); // without the extra parameter
}Isn't the method recursively calling itself with the current change?
is_denseflag must be set aftercopyPointCloud, otherwise it will be overwritten.is_denseshould be set to true (because it IS true, not because we don't want to check).copyPointCloud.tgtingetPointCloudDifference, it only needs the kd-tree.