---[ */
| 111 | |
| 112 | /* ---[ */ |
| 113 | int |
| 114 | main (int argc, char** argv) |
| 115 | { |
| 116 | if (argc < 2) |
| 117 | { |
| 118 | std::cerr << "This test requires two point clouds (one for training and one for testing)." << std::endl; |
| 119 | std::cerr << "You can use these two clouds 'ism_train.pcd' and 'ism_test.pcd'." << std::endl; |
| 120 | return (-1); |
| 121 | } |
| 122 | |
| 123 | training_cloud.reset (new pcl::PointCloud<pcl::PointXYZ>); |
| 124 | if (pcl::io::loadPCDFile (argv[1], *training_cloud) < 0) |
| 125 | { |
| 126 | std::cerr << "Failed to read test file. Please download `ism_train.pcd` and pass its path to the test." << std::endl; |
| 127 | return (-1); |
| 128 | } |
| 129 | testing_cloud.reset (new pcl::PointCloud<pcl::PointXYZ>); |
| 130 | if (pcl::io::loadPCDFile (argv[2], *testing_cloud) < 0) |
| 131 | { |
| 132 | std::cerr << "Failed to read test file. Please download `ism_test.pcd` and pass its path to the test." << std::endl; |
| 133 | return (-1); |
| 134 | } |
| 135 | |
| 136 | training_normals.reset (new pcl::PointCloud<pcl::Normal>); |
| 137 | testing_normals.reset (new pcl::PointCloud<pcl::Normal>); |
| 138 | pcl::NormalEstimation<pcl::PointXYZ, pcl::Normal> normal_estimator; |
| 139 | normal_estimator.setRadiusSearch (25.0); |
| 140 | normal_estimator.setInputCloud(training_cloud); |
| 141 | normal_estimator.compute(*training_normals); |
| 142 | normal_estimator.setInputCloud(testing_cloud); |
| 143 | normal_estimator.compute(*testing_normals); |
| 144 | |
| 145 | testing::InitGoogleTest (&argc, argv); |
| 146 | return (RUN_ALL_TESTS ()); |
| 147 | } |
| 148 | /* ]--- */ |
nothing calls this directly
no test coverage detected