---[ */
| 110 | |
| 111 | /* ---[ */ |
| 112 | int |
| 113 | main (int argc, char** argv) |
| 114 | { |
| 115 | if (argc < 2) |
| 116 | { |
| 117 | std::cerr << "No test file given. Please download `bun0.pcd` and pass its path to the test." << std::endl; |
| 118 | return (-1); |
| 119 | } |
| 120 | |
| 121 | // Load file |
| 122 | pcl::PCLPointCloud2 cloud_blob; |
| 123 | loadPCDFile (argv[1], cloud_blob); |
| 124 | fromPCLPointCloud2 (cloud_blob, *cloud); |
| 125 | |
| 126 | // Create search tree |
| 127 | tree.reset (new search::KdTree<PointXYZ> (false)); |
| 128 | tree->setInputCloud (cloud); |
| 129 | |
| 130 | // Normal estimation |
| 131 | NormalEstimation<PointXYZ, Normal> n; |
| 132 | PointCloud<Normal>::Ptr normals (new PointCloud<Normal> ()); |
| 133 | n.setInputCloud (cloud); |
| 134 | //n.setIndices (indices[B); |
| 135 | n.setSearchMethod (tree); |
| 136 | n.setKSearch (20); |
| 137 | n.compute (*normals); |
| 138 | |
| 139 | // Concatenate XYZ and normal information |
| 140 | pcl::concatenateFields (*cloud, *normals, *cloud_with_normals); |
| 141 | |
| 142 | // Create search tree |
| 143 | tree2.reset (new search::KdTree<PointNormal>); |
| 144 | tree2->setInputCloud (cloud_with_normals); |
| 145 | |
| 146 | // Process for update cloud |
| 147 | if(argc == 3){ |
| 148 | pcl::PCLPointCloud2 cloud_blob1; |
| 149 | loadPCDFile (argv[2], cloud_blob1); |
| 150 | fromPCLPointCloud2 (cloud_blob1, *cloud1); |
| 151 | // Create search tree |
| 152 | tree3.reset (new search::KdTree<PointXYZ> (false)); |
| 153 | tree3->setInputCloud (cloud1); |
| 154 | |
| 155 | // Normal estimation |
| 156 | NormalEstimation<PointXYZ, Normal> n1; |
| 157 | PointCloud<Normal>::Ptr normals1 (new PointCloud<Normal> ()); |
| 158 | n1.setInputCloud (cloud1); |
| 159 | |
| 160 | n1.setSearchMethod (tree3); |
| 161 | n1.setKSearch (20); |
| 162 | n1.compute (*normals1); |
| 163 | |
| 164 | // Concatenate XYZ and normal information |
| 165 | pcl::concatenateFields (*cloud1, *normals1, *cloud_with_normals1); |
| 166 | // Create search tree |
| 167 | tree4.reset (new search::KdTree<PointNormal>); |
| 168 | tree4->setInputCloud (cloud_with_normals1); |
| 169 | } |
nothing calls this directly
no test coverage detected