From 13e0644025118e28b6d7e8b7b840657fbd5f2d4d Mon Sep 17 00:00:00 2001 From: "Radu B. Rusu" Date: Sun, 17 Apr 2011 22:31:39 +0000 Subject: [PATCH] moved away from make_shared completely git-svn-id: svn+ssh://svn.pointclouds.org/pcl/trunk@525 a9d63959-f2ad-4865-b262-bf0e56cfafb6 --- test/test_feature.cpp | 13 ++++++++----- test/test_octree.cpp | 1 - test/test_registration.cpp | 6 +++--- test/test_sample_consensus.cpp | 5 +++-- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/test/test_feature.cpp b/test/test_feature.cpp index 137f7926f..bf33b9821 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 6f80aae98..241f365fa 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 57eaf3f7a..a10051881 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 d447f50ee..d6a64629a 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_); -- GitLab