---[ */
| 130 | |
| 131 | /* ---[ */ |
| 132 | int |
| 133 | main (int argc, char** argv) |
| 134 | { |
| 135 | print_info ("Take the input point cloud and transform it according to its stored VIEWPOINT information. For more information, use %s -h\n", argv[0]); |
| 136 | bool help = false; |
| 137 | parse_argument (argc, argv, "-h", help); |
| 138 | if (argc < 3 || help) |
| 139 | { |
| 140 | printHelp (argc, argv); |
| 141 | return (-1); |
| 142 | } |
| 143 | |
| 144 | // Parse the command line arguments for .pcd files |
| 145 | std::vector<int> p_file_indices; |
| 146 | p_file_indices = parse_file_extension_argument (argc, argv, ".pcd"); |
| 147 | if (p_file_indices.size () != 2) |
| 148 | { |
| 149 | print_error ("Need one input PCD file and one output PCD file to continue.\n"); |
| 150 | return (-1); |
| 151 | } |
| 152 | |
| 153 | // Load the first file |
| 154 | pcl::PCLPointCloud2::Ptr cloud (new pcl::PCLPointCloud2); |
| 155 | if (!loadCloud (argv[p_file_indices[0]], *cloud)) |
| 156 | return (-1); |
| 157 | |
| 158 | // Perform the feature estimation |
| 159 | pcl::PCLPointCloud2 output; |
| 160 | transform (cloud, output); |
| 161 | |
| 162 | // Save into the second file |
| 163 | saveCloud (argv[p_file_indices[1]], output); |
| 164 | } |
| 165 |