diff --git a/test/test_feature.cpp b/test/test_feature.cpp index 137f7926fd18c1ad6acc722ee3fbf0cb5902d821..bf33b982145fde311f2a68ccc6e119847552ef28 100644 --- a/test/test_feature.cpp +++ b/test/test_feature.cpp @@ -38,7 +38,6 @@ #include -#include #include #include #include @@ -949,7 +948,8 @@ TEST (PCL, IntensityGradientEstimation) PointCloud::Ptr normals (new PointCloud ()); NormalEstimation norm_est; norm_est.setInputCloud (cloud_ptr); - norm_est.setSearchMethod (boost::make_shared > (false)); + KdTreeFLANN::Ptr treept1 (new KdTreeFLANN (false)); + norm_est.setSearchMethod (treept1); norm_est.setRadiusSearch (0.25); norm_est.compute (*normals); @@ -958,7 +958,8 @@ TEST (PCL, IntensityGradientEstimation) IntensityGradientEstimation grad_est; grad_est.setInputCloud (cloud_ptr); grad_est.setInputNormals (normals); - grad_est.setSearchMethod (boost::make_shared > (false)); + KdTreeFLANN::Ptr treept2 (new KdTreeFLANN (false)); + grad_est.setSearchMethod (treept2); grad_est.setRadiusSearch (0.25); grad_est.compute (gradient); @@ -1024,7 +1025,8 @@ TEST (PCL, IntensitySpinEstimation) // Compute the intensity-domain spin features typedef Histogram<20> IntensitySpin; IntensitySpinEstimation ispin_est; - ispin_est.setSearchMethod (boost::make_shared > (false)); + KdTreeFLANN::Ptr treept3 (new KdTreeFLANN (false)); + ispin_est.setSearchMethod (treept3); ispin_est.setRadiusSearch (10.0); ispin_est.setNrDistanceBins (4); ispin_est.setNrIntensityBins (5); @@ -1110,7 +1112,8 @@ TEST (PCL, RIFTEstimation) // Compute the RIFT features typedef Histogram<32> RIFTDescriptor; RIFTEstimation rift_est; - rift_est.setSearchMethod (boost::make_shared > (false)); + KdTreeFLANN::Ptr treept4 (new KdTreeFLANN (false)); + rift_est.setSearchMethod (treept4); rift_est.setRadiusSearch (10.0); rift_est.setNrDistanceBins (4); rift_est.setNrGradientBins (8); diff --git a/test/test_octree.cpp b/test/test_octree.cpp index 6f80aae98b35351de0af5795746d79d800542bf3..241f365fabebb05191131433f6fbe2b73993f7a1 100644 --- a/test/test_octree.cpp +++ b/test/test_octree.cpp @@ -46,7 +46,6 @@ using namespace std; #include #include #include -#include using namespace pcl; diff --git a/test/test_registration.cpp b/test/test_registration.cpp index 57eaf3f7a51950e7023bd43ee5a813906f841b57..a1005188188e78fc5af3e50dfe390c84d36c814c 100644 --- a/test/test_registration.cpp +++ b/test/test_registration.cpp @@ -229,15 +229,15 @@ TEST (PCL, SampleConsensusInitialAlignment) cloud_target_ptr = cloud_target.makeShared (); // Initialize estimators for surface normals and FPFH features - KdTreeFLANN tree; + KdTreeFLANN::Ptr tree (new KdTreeFLANN); NormalEstimation norm_est; - norm_est.setSearchMethod (boost::make_shared > (tree)); + norm_est.setSearchMethod (tree); norm_est.setRadiusSearch (0.05); PointCloud normals; FPFHEstimation fpfh_est; - fpfh_est.setSearchMethod (boost::make_shared > (tree)); + fpfh_est.setSearchMethod (tree); fpfh_est.setRadiusSearch (0.05); PointCloud features_source, features_target; diff --git a/test/test_sample_consensus.cpp b/test/test_sample_consensus.cpp index d447f50ee87812e3808de4a6f2de98fe48512df1..d6a64629abb4e771836f6c1b2ef1fd694878669e 100644 --- a/test/test_sample_consensus.cpp +++ b/test/test_sample_consensus.cpp @@ -835,10 +835,11 @@ int // Estimate surface normals NormalEstimation n; - KdTree::Ptr tree = boost::make_shared > (); + KdTree::Ptr tree (new KdTreeFLANN); tree->setInputCloud (cloud_); n.setInputCloud (cloud_); - n.setIndices (boost::make_shared > (indices_)); + boost::shared_ptr > indicesptr (new vector (indices_)); + n.setIndices (indicesptr); n.setSearchMethod (tree); n.setRadiusSearch (0.02); // Use 2cm radius to estimate the normals n.compute (*normals_);