diff --git a/common/include/pcl/pcl_base.h b/common/include/pcl/pcl_base.h index e3fc1d4775c..8236bbcda36 100644 --- a/common/include/pcl/pcl_base.h +++ b/common/include/pcl/pcl_base.h @@ -57,8 +57,9 @@ namespace pcl { // definitions used everywhere - using IndicesPtr = boost::shared_ptr >; - using IndicesConstPtr = boost::shared_ptr >; + using Indices = std::vector; + using IndicesPtr = boost::shared_ptr; + using IndicesConstPtr = boost::shared_ptr; ///////////////////////////////////////////////////////////////////////////////////////// /** \brief PCL base class. Implements methods that are used by most PCL algorithms. diff --git a/test/features/test_board_estimation.cpp b/test/features/test_board_estimation.cpp index a173103d94f..d61ad556c33 100644 --- a/test/features/test_board_estimation.cpp +++ b/test/features/test_board_estimation.cpp @@ -61,7 +61,7 @@ TEST (PCL, BOARDLocalReferenceFrameEstimation) PointCloud::Ptr normals (new PointCloud ()); PointCloud bunny_LRF; - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); // Compute normals NormalEstimation ne; diff --git a/test/features/test_boundary_estimation.cpp b/test/features/test_boundary_estimation.cpp index 2c8e01be411..f265c6afed0 100644 --- a/test/features/test_boundary_estimation.cpp +++ b/test/features/test_boundary_estimation.cpp @@ -64,7 +64,7 @@ TEST (PCL, BoundaryEstimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setKSearch (static_cast (indices.size ())); diff --git a/test/features/test_curvatures_estimation.cpp b/test/features/test_curvatures_estimation.cpp index 918f8340e01..db5c35596d6 100644 --- a/test/features/test_curvatures_estimation.cpp +++ b/test/features/test_curvatures_estimation.cpp @@ -63,7 +63,7 @@ TEST (PCL, PrincipalCurvaturesEstimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setKSearch (10); // Use 10 nearest neighbors to estimate the normals diff --git a/test/features/test_cvfh_estimation.cpp b/test/features/test_cvfh_estimation.cpp index 2c2aa306ba2..2cd16d4d1e3 100644 --- a/test/features/test_cvfh_estimation.cpp +++ b/test/features/test_cvfh_estimation.cpp @@ -67,7 +67,7 @@ TEST (PCL, CVFHEstimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setKSearch (10); // Use 10 nearest neighbors to estimate the normals diff --git a/test/features/test_invariants_estimation.cpp b/test/features/test_invariants_estimation.cpp index 7d426a93275..7d166320f3e 100644 --- a/test/features/test_invariants_estimation.cpp +++ b/test/features/test_invariants_estimation.cpp @@ -76,7 +76,7 @@ TEST (PCL, MomentInvariantsEstimation) // set parameters mi.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); mi.setIndices (indicesptr); mi.setSearchMethod (tree); mi.setKSearch (static_cast (indices.size ())); diff --git a/test/features/test_normal_estimation.cpp b/test/features/test_normal_estimation.cpp index 6aa4f8c665b..1d3907cb9f0 100644 --- a/test/features/test_normal_estimation.cpp +++ b/test/features/test_normal_estimation.cpp @@ -142,7 +142,7 @@ TEST (PCL, NormalEstimation) PointCloud::Ptr cloudptr = cloud.makeShared (); n.setInputCloud (cloudptr); EXPECT_EQ (n.getInputCloud (), cloudptr); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); EXPECT_EQ (n.getIndices (), indicesptr); n.setSearchMethod (tree); @@ -193,7 +193,7 @@ TEST (PCL, NormalEstimationOpenMP) PointCloud::Ptr cloudptr = cloud.makeShared (); n.setInputCloud (cloudptr); EXPECT_EQ (n.getInputCloud (), cloudptr); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); EXPECT_EQ (n.getIndices (), indicesptr); n.setSearchMethod (tree); diff --git a/test/features/test_pfh_estimation.cpp b/test/features/test_pfh_estimation.cpp index 38151560878..dbf61335e37 100644 --- a/test/features/test_pfh_estimation.cpp +++ b/test/features/test_pfh_estimation.cpp @@ -63,7 +63,7 @@ static KdTreePtr tree; template class FeatureEstimation, typename PointT, typename NormalT, typename OutputT> void testIndicesAndSearchSurface (const typename PointCloud::Ptr & points, const typename PointCloud::Ptr & normals, - const boost::shared_ptr > & indices, int ndims) + const pcl::IndicesPtr & indices, int ndims) { using KdTreeT = pcl::search::KdTree; @@ -120,7 +120,7 @@ testIndicesAndSearchSurface (const typename PointCloud::Ptr & points, // PointCloud output3, output4; - boost::shared_ptr > indices2 (new std::vector (0)); + pcl::IndicesPtr indices2 (new pcl::Indices (0)); for (size_t i = 0; i < (indices->size ()/2); ++i) indices2->push_back (static_cast (i)); @@ -204,7 +204,7 @@ TEST (PCL, PFHEstimation) // Object PointCloud::Ptr pfhs (new PointCloud ()); - boost::shared_ptr > indicesptr (new std::vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); // set parameters pfh.setInputCloud (cloud); @@ -251,7 +251,7 @@ TEST (PCL, PFHEstimation) // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new std::vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud->size (); i+=3) test_indices->push_back (static_cast (i)); @@ -391,7 +391,7 @@ TYPED_TEST (FPFHTest, Estimation) // Object PointCloud::Ptr fpfhs (new PointCloud ()); - boost::shared_ptr > indicesptr (new std::vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); // set parameters fpfh.setInputCloud (cloud); @@ -440,7 +440,7 @@ TYPED_TEST (FPFHTest, Estimation) // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new std::vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud->size (); i+=3) test_indices->push_back (static_cast (i)); @@ -457,7 +457,7 @@ TEST (PCL, VFHEstimation) // Object pcl::VFHEstimation vfh; PointCloud::Ptr vfhs (new PointCloud ()); - boost::shared_ptr > indicesptr (new std::vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); // set parameters vfh.setInputCloud (cloud); diff --git a/test/features/test_ppf_estimation.cpp b/test/features/test_ppf_estimation.cpp index b749e8e4b8a..0ef01b05331 100644 --- a/test/features/test_ppf_estimation.cpp +++ b/test/features/test_ppf_estimation.cpp @@ -50,7 +50,7 @@ using namespace std; using KdTreePtr = search::KdTree::Ptr; PointCloud cloud; -vector indices; +pcl::Indices indices; KdTreePtr tree; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ TEST (PCL, PPFEstimation) NormalEstimation normal_estimation; PointCloud::Ptr normals (new PointCloud ()); normal_estimation.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); normal_estimation.setIndices (indicesptr); normal_estimation.setSearchMethod (tree); normal_estimation.setKSearch (10); // Use 10 nearest neighbors to estimate the normals diff --git a/test/features/test_rops_estimation.cpp b/test/features/test_rops_estimation.cpp index 1d62d6f4b4d..9b1c81bc480 100644 --- a/test/features/test_rops_estimation.cpp +++ b/test/features/test_rops_estimation.cpp @@ -135,7 +135,7 @@ main (int argc, char** argv) return (-1); } - indices = boost::shared_ptr (new pcl::PointIndices ()); + indices.reset (new pcl::PointIndices); std::ifstream indices_file; indices_file.open (argv[2], std::ifstream::in); for (std::string line; std::getline (indices_file, line);) diff --git a/test/features/test_rsd_estimation.cpp b/test/features/test_rsd_estimation.cpp index e9af1290335..54cdeb299d7 100644 --- a/test/features/test_rsd_estimation.cpp +++ b/test/features/test_rsd_estimation.cpp @@ -82,10 +82,7 @@ TEST (PCL, RSDEstimation) rsd.setSaveHistograms (true); rsd.compute (*rsds); - using vec_matrixXf = std::vector >; - boost::shared_ptr mat (new vec_matrixXf); - - mat = rsd.getHistograms(); + auto mat = rsd.getHistograms(); EXPECT_EQ (1, (*mat)[140](0, 0)); EXPECT_EQ (3, (*mat)[140](0, 1)); diff --git a/test/features/test_shot_estimation.cpp b/test/features/test_shot_estimation.cpp index 12c97b9c306..cdf812bf33e 100644 --- a/test/features/test_shot_estimation.cpp +++ b/test/features/test_shot_estimation.cpp @@ -208,7 +208,7 @@ struct createSHOTDesc, PointT, NormalT, Outp template void testSHOTIndicesAndSearchSurface (const typename PointCloud::Ptr & points, const typename PointCloud::Ptr & normals, - const boost::shared_ptr > & indices, + const pcl::IndicesPtr & indices, const int nr_shape_bins = 10, const int nr_color_bins = 30, const bool describe_shape = true, @@ -256,7 +256,7 @@ testSHOTIndicesAndSearchSurface (const typename PointCloud::Ptr & points // PointCloud output3, output4; - boost::shared_ptr > indices2 (new vector (0)); + pcl::IndicesPtr indices2 (new pcl::Indices (0)); for (size_t i = 0; i < (indices->size ()/2); ++i) indices2->push_back (static_cast (i)); @@ -280,7 +280,7 @@ testSHOTIndicesAndSearchSurface (const typename PointCloud::Ptr & points template void testSHOTLocalReferenceFrame (const typename PointCloud::Ptr & points, const typename PointCloud::Ptr & normals, - const boost::shared_ptr > & indices, + const pcl::IndicesPtr & indices, const int nr_shape_bins = 10, const int nr_color_bins = 30, const bool describe_shape = true, @@ -291,7 +291,7 @@ testSHOTLocalReferenceFrame (const typename PointCloud::Ptr & points, typename PointCloud::Ptr subpoints (new PointCloud ()); copyPointCloud (*points, *indices, *subpoints); - boost::shared_ptr > indices2 (new vector (0)); + pcl::IndicesPtr indices2 (new pcl::Indices (0)); for (size_t i = 0; i < (indices->size ()/2); ++i) indices2->push_back (static_cast (i)); // @@ -383,7 +383,7 @@ TYPED_TEST (SHOTShapeTest, Estimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setRadiusSearch (20 * mr); @@ -462,7 +462,7 @@ TYPED_TEST (SHOTShapeTest, Estimation) // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud.size (); i+=3) test_indices->push_back (static_cast (i)); @@ -487,7 +487,7 @@ TEST (PCL, GenericSHOTShapeEstimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setRadiusSearch (20 * mr); @@ -522,7 +522,7 @@ TEST (PCL, GenericSHOTShapeEstimation) EXPECT_NEAR (shots->points[103].descriptor[123], 0.019105887, 1e-5); // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud.size (); i+=3) test_indices->push_back (static_cast (i)); @@ -572,7 +572,7 @@ TYPED_TEST (SHOTShapeAndColorTest, Estimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setRadiusSearch (20 * mr); @@ -676,7 +676,7 @@ TYPED_TEST (SHOTShapeAndColorTest, Estimation) EXPECT_NEAR (shots1344->points[103].descriptor[512], 0.048375979, 1e-5); // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud.size (); i+=3) test_indices->push_back (static_cast (i)); @@ -761,7 +761,7 @@ TEST (PCL,3DSCEstimation) EXPECT_FLOAT_EQ ((*sc3ds)[108].descriptor[1900], 43.799442f); // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud.size (); i++) test_indices->push_back (static_cast (i)); @@ -814,7 +814,7 @@ TEST (PCL, USCEstimation) EXPECT_NEAR ((*uscds)[168].descriptor[1756], 65.1737f, 1e-4f); // Test results when setIndices and/or setSearchSurface are used - boost::shared_ptr > test_indices (new vector (0)); + pcl::IndicesPtr test_indices (new pcl::Indices (0)); for (size_t i = 0; i < cloud.size (); i+=3) test_indices->push_back (static_cast (i)); diff --git a/test/features/test_shot_lrf_estimation.cpp b/test/features/test_shot_lrf_estimation.cpp index 3160e1b1b81..71165056e8d 100644 --- a/test/features/test_shot_lrf_estimation.cpp +++ b/test/features/test_shot_lrf_estimation.cpp @@ -59,7 +59,7 @@ TEST (PCL, SHOTLocalReferenceFrameEstimation) { PointCloud bunny_LRF; - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); // Compute SHOT LRF SHOTLocalReferenceFrameEstimation lrf_estimator; diff --git a/test/features/test_spin_estimation.cpp b/test/features/test_spin_estimation.cpp index fb10a1551e6..15eb9f1c066 100644 --- a/test/features/test_spin_estimation.cpp +++ b/test/features/test_spin_estimation.cpp @@ -63,7 +63,7 @@ TEST (PCL, SpinImageEstimation) PointCloud::Ptr normals (new PointCloud ()); // set parameters n.setInputCloud (cloud.makeShared ()); - boost::shared_ptr > indicesptr (new vector (indices)); + pcl::IndicesPtr indicesptr (new pcl::Indices (indices)); n.setIndices (indicesptr); n.setSearchMethod (tree); n.setRadiusSearch (20 * mr); diff --git a/test/filters/test_filters.cpp b/test/filters/test_filters.cpp index 293b7920a10..d051d21a9fb 100644 --- a/test/filters/test_filters.cpp +++ b/test/filters/test_filters.cpp @@ -82,7 +82,7 @@ TEST (ExtractIndicesSelf, Filters) { // Test the PointCloud method ExtractIndices ei; - boost::shared_ptr > indices (new vector (2)); + pcl::IndicesPtr indices (new pcl::Indices (2)); (*indices)[0] = 0; (*indices)[1] = static_cast (cloud->points.size ()) - 1; @@ -109,7 +109,7 @@ TEST (ExtractIndices, Filters) { // Test the PointCloud method ExtractIndices ei; - boost::shared_ptr > indices (new vector (2)); + pcl::IndicesPtr indices (new pcl::Indices (2)); (*indices)[0] = 0; (*indices)[1] = static_cast (cloud->points.size ()) - 1; @@ -230,7 +230,7 @@ TEST (ExtractIndices, Filters) eie.filter (result); EXPECT_EQ (int (result.points.size ()), 0); - boost::shared_ptr > idx (new vector (10)); + pcl::IndicesPtr idx (new pcl::Indices (10)); eie.setIndices (idx); eie.setNegative (false); eie.filter (result); @@ -1651,7 +1651,7 @@ TEST (ConditionalRemovalSetIndices, Filters) PointCloud output; // build some indices - boost::shared_ptr > indices (new vector (2)); + pcl::IndicesPtr indices (new pcl::Indices (2)); (*indices)[0] = 0; (*indices)[1] = static_cast (cloud->points.size ()) - 1; diff --git a/test/kdtree/test_kdtree.cpp b/test/kdtree/test_kdtree.cpp index d6bf9e90826..b473e735411 100644 --- a/test/kdtree/test_kdtree.cpp +++ b/test/kdtree/test_kdtree.cpp @@ -254,7 +254,7 @@ TEST (PCL, KdTreeFLANN_setPointRepresentation) } // Find k nearest neighbors with a different point representation - boost::shared_ptr ptrep (new MyPointRepresentationXY); + KdTreeFLANN::PointRepresentationConstPtr ptrep (new MyPointRepresentationXY); kdtree.setPointRepresentation (ptrep); kdtree.nearestKSearch (p, k, k_indices, k_distances); for (int i = 0; i < k; ++i) diff --git a/test/keypoints/test_keypoints.cpp b/test/keypoints/test_keypoints.cpp index 997227a1251..dd8ddd117df 100644 --- a/test/keypoints/test_keypoints.cpp +++ b/test/keypoints/test_keypoints.cpp @@ -128,7 +128,7 @@ TEST (PCL, SIFTKeypoint_radiusSearch) const float scale = 0.02f; KdTreeFLANN::Ptr tree_ (new KdTreeFLANN); - boost::shared_ptr > cloud = cloud_xyzi->makeShared (); + auto cloud = cloud_xyzi->makeShared (); ApproximateVoxelGrid voxel_grid; const float s = 1.0 * scale; diff --git a/test/outofcore/test_outofcore.cpp b/test/outofcore/test_outofcore.cpp index f8c0f30dd00..ef879c1ab61 100644 --- a/test/outofcore/test_outofcore.cpp +++ b/test/outofcore/test_outofcore.cpp @@ -724,7 +724,7 @@ TEST_F (OutofcoreTest, PointCloud2_Constructors) test_cloud->points.push_back (tmp); } - boost::shared_ptr point_cloud (new pcl::PCLPointCloud2 ()); + pcl::PCLPointCloud2::Ptr point_cloud (new pcl::PCLPointCloud2); pcl::toPCLPointCloud2 (*test_cloud, *point_cloud); diff --git a/test/recognition/test_recognition_ism.cpp b/test/recognition/test_recognition_ism.cpp index 7118f6dc8bf..258ea83f87f 100644 --- a/test/recognition/test_recognition_ism.cpp +++ b/test/recognition/test_recognition_ism.cpp @@ -70,7 +70,7 @@ TEST (ISM, TrainRecognize) fpfh->setRadiusSearch (30.0); pcl::Feature< pcl::PointXYZ, pcl::Histogram<153> >::Ptr feature_estimator(fpfh); - pcl::ism::ImplicitShapeModelEstimation<153, pcl::PointXYZ, pcl::Normal>::ISMModelPtr model = boost::shared_ptr (new pcl::features::ISMModel); + pcl::ism::ImplicitShapeModelEstimation<153, pcl::PointXYZ, pcl::Normal>::ISMModelPtr model (new pcl::features::ISMModel); pcl::ism::ImplicitShapeModelEstimation<153, pcl::PointXYZ, pcl::Normal> ism; ism.setFeatureEstimator(feature_estimator); @@ -84,7 +84,7 @@ TEST (ISM, TrainRecognize) double radius = model->sigmas_[_class] * 10.0; double sigma = model->sigmas_[_class]; - boost::shared_ptr > vote_list = ism.findObjects (model, testing_cloud, testing_normals, _class); + auto vote_list = ism.findObjects (model, testing_cloud, testing_normals, _class); EXPECT_NE (vote_list->getNumberOfVotes (), 0); std::vector > strongest_peaks; vote_list->findStrongestPeaks (strongest_peaks, _class, radius, sigma); diff --git a/test/registration/test_registration.cpp b/test/registration/test_registration.cpp index 7b27e7a584d..2bb49f52e15 100644 --- a/test/registration/test_registration.cpp +++ b/test/registration/test_registration.cpp @@ -401,7 +401,7 @@ TEST (PCL, IterativeClosestPoint_PointToPlane) IterativeClosestPoint reg; using PointToPlane = registration::TransformationEstimationPointToPlane; - boost::shared_ptr point_to_plane (new PointToPlane); + PointToPlane::Ptr point_to_plane (new PointToPlane); reg.setTransformationEstimation (point_to_plane); reg.setInputSource (src); reg.setInputTarget (tgt); diff --git a/test/registration/test_registration_api.cpp b/test/registration/test_registration_api.cpp index 3fc6d9a6c0a..f45865dd01f 100644 --- a/test/registration/test_registration_api.cpp +++ b/test/registration/test_registration_api.cpp @@ -80,7 +80,7 @@ TEST (PCL, CorrespondenceEstimation) CloudXYZConstPtr source (new CloudXYZ (cloud_source)); CloudXYZConstPtr target (new CloudXYZ (cloud_target)); - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); @@ -104,7 +104,7 @@ TEST (PCL, CorrespondenceEstimationReciprocal) CloudXYZConstPtr source (new CloudXYZ (cloud_source)); CloudXYZConstPtr target (new CloudXYZ (cloud_target)); - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); @@ -129,13 +129,13 @@ TEST (PCL, CorrespondenceRejectorDistance) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); corr_est.determineCorrespondences (*correspondences); - boost::shared_ptr correspondences_result_rej_dist (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_dist (new pcl::Correspondences); pcl::registration::CorrespondenceRejectorDistance corr_rej_dist; corr_rej_dist.setInputCorrespondences (correspondences); corr_rej_dist.setMaximumDistance (rej_dist_max_dist); @@ -160,13 +160,13 @@ TEST (PCL, CorrespondenceRejectorMedianDistance) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); corr_est.determineCorrespondences (*correspondences); - boost::shared_ptr correspondences_result_rej_median_dist (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_median_dist (new pcl::Correspondences); pcl::registration::CorrespondenceRejectorMedianDistance corr_rej_median_dist; corr_rej_median_dist.setInputCorrespondences(correspondences); corr_rej_median_dist.setMedianFactor (rej_median_factor); @@ -193,13 +193,13 @@ TEST (PCL, CorrespondenceRejectorOneToOne) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); corr_est.determineCorrespondences (*correspondences); - boost::shared_ptr correspondences_result_rej_one_to_one (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_one_to_one (new pcl::Correspondences); pcl::registration::CorrespondenceRejectorOneToOne corr_rej_one_to_one; corr_rej_one_to_one.setInputCorrespondences(correspondences); corr_rej_one_to_one.getCorrespondences(*correspondences_result_rej_one_to_one); @@ -223,14 +223,14 @@ TEST (PCL, CorrespondenceRejectorSampleConsensus) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); corr_est.determineCorrespondences (*correspondences); EXPECT_EQ (int (correspondences->size ()), nr_original_correspondences); - boost::shared_ptr correspondences_result_rej_sac (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_sac (new pcl::Correspondences); pcl::registration::CorrespondenceRejectorSampleConsensus corr_rej_sac; corr_rej_sac.setInputSource (source); corr_rej_sac.setInputTarget (target); @@ -264,7 +264,7 @@ TEST (PCL, CorrespondenceRejectorSurfaceNormal) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); @@ -295,7 +295,7 @@ TEST (PCL, CorrespondenceRejectorSurfaceNormal) corr_rej_surf_norm.setInputNormals (source_normals); corr_rej_surf_norm.setTargetNormals (target_normals); - boost::shared_ptr correspondences_result_rej_surf_norm (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_surf_norm (new pcl::Correspondences); corr_rej_surf_norm.setInputCorrespondences (correspondences); corr_rej_surf_norm.setThreshold (0.5); @@ -318,13 +318,13 @@ TEST (PCL, CorrespondenceRejectorTrimmed) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); corr_est.determineCorrespondences (*correspondences); - boost::shared_ptr correspondences_result_rej_trimmed (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_trimmed (new pcl::Correspondences); pcl::registration::CorrespondenceRejectorTrimmed corr_rej_trimmed; corr_rej_trimmed.setOverlapRatio(rej_trimmed_overlap); corr_rej_trimmed.setInputCorrespondences(correspondences); @@ -349,13 +349,13 @@ TEST (PCL, CorrespondenceRejectorVarTrimmed) CloudXYZConstPtr target (new CloudXYZ (cloud_target)); // re-do correspondence estimation - boost::shared_ptr correspondences (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences (new pcl::Correspondences); pcl::registration::CorrespondenceEstimation corr_est; corr_est.setInputSource (source); corr_est.setInputTarget (target); corr_est.determineCorrespondences (*correspondences); - boost::shared_ptr correspondences_result_rej_var_trimmed_dist (new pcl::Correspondences); + pcl::CorrespondencesPtr correspondences_result_rej_var_trimmed_dist (new pcl::Correspondences); pcl::registration::CorrespondenceRejectorVarTrimmed corr_rej_var_trimmed_dist; corr_rej_var_trimmed_dist.setInputSource (source); corr_rej_var_trimmed_dist.setInputTarget (target); diff --git a/test/sample_consensus/test_sample_consensus_plane_models.cpp b/test/sample_consensus/test_sample_consensus_plane_models.cpp index f52bfb2414a..a641bf9b85a 100644 --- a/test/sample_consensus/test_sample_consensus_plane_models.cpp +++ b/test/sample_consensus/test_sample_consensus_plane_models.cpp @@ -123,7 +123,7 @@ TEST (SampleConsensusModelPlane, Base) cloud = model->getInputCloud (); ASSERT_EQ (cloud_->points.size (), cloud->points.size ()); - boost::shared_ptr > indices = model->getIndices (); + auto indices = model->getIndices (); ASSERT_EQ (indices_.size (), indices->size ()); model->setIndices (indices_); indices = model->getIndices (); diff --git a/test/search/test_search.cpp b/test/search/test_search.cpp index b974b0280b4..804a1298cef 100644 --- a/test/search/test_search.cpp +++ b/test/search/test_search.cpp @@ -306,9 +306,9 @@ testKNNSearch (typename PointCloud::ConstPtr point_cloud, vector > input_indices_; + pcl::IndicesPtr input_indices_; if (!input_indices.empty ()) - input_indices_.reset (new vector (input_indices)); + input_indices_.reset (new pcl::Indices (input_indices)); #pragma omp parallel for for (int sIdx = 0; sIdx < int (search_methods.size ()); ++sIdx) @@ -376,9 +376,9 @@ testRadiusSearch (typename PointCloud::ConstPtr point_cloud, vector > input_indices_; + pcl::IndicesPtr input_indices_; if (!input_indices.empty ()) - input_indices_.reset (new vector (input_indices)); + input_indices_.reset (new pcl::Indices (input_indices)); #pragma omp parallel for for (int sIdx = 0; sIdx < int (search_methods.size ()); ++sIdx)