MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / main

Function main

tools/transform_from_viewpoint.cpp:132–164  ·  view source on GitHub ↗

---[ */

Source from the content-addressed store, hash-verified

130
131/* ---[ */
132int
133main (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

Callers

nothing calls this directly

Calls 6

parse_argumentFunction · 0.85
printHelpFunction · 0.70
loadCloudFunction · 0.70
transformFunction · 0.70
saveCloudFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected