| 478 | } |
| 479 | |
| 480 | int RunModelClusterer(int argc, char** argv) { |
| 481 | std::filesystem::path input_path; |
| 482 | std::filesystem::path output_path; |
| 483 | |
| 484 | OptionManager options; |
| 485 | options.AddRequiredOption("input_path", &input_path); |
| 486 | options.AddRequiredOption("output_path", &output_path); |
| 487 | options.AddReconstructionClustererOptions(); |
| 488 | if (!options.Parse(argc, argv)) { |
| 489 | return EXIT_FAILURE; |
| 490 | } |
| 491 | |
| 492 | if (!ExistsDir(input_path)) { |
| 493 | LOG(ERROR) << "`input_path` is not a directory"; |
| 494 | return EXIT_FAILURE; |
| 495 | } |
| 496 | |
| 497 | if (!ExistsDir(output_path)) { |
| 498 | LOG(ERROR) << "`output_path` is not a directory"; |
| 499 | return EXIT_FAILURE; |
| 500 | } |
| 501 | |
| 502 | LOG_HEADING1("Loading model"); |
| 503 | auto reconstruction = std::make_shared<Reconstruction>(); |
| 504 | reconstruction->Read(input_path); |
| 505 | |
| 506 | auto reconstruction_manager = std::make_shared<ReconstructionManager>(); |
| 507 | |
| 508 | ReconstructionClustererController controller( |
| 509 | *options.reconstruction_clusterer, |
| 510 | reconstruction, |
| 511 | reconstruction_manager); |
| 512 | controller.Run(); |
| 513 | |
| 514 | LOG_HEADING1("Writing clustered model(s)"); |
| 515 | reconstruction_manager->Write(output_path); |
| 516 | |
| 517 | return EXIT_SUCCESS; |
| 518 | } |
| 519 | |
| 520 | int RunModelComparer(int argc, char** argv) { |
| 521 | std::filesystem::path input_path1; |
nothing calls this directly
no test coverage detected