Skip to content

Commit

Permalink
Add file loading: GUI is started if output file is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
nmellado committed Jan 8, 2024
1 parent 45a1b34 commit 3c5623c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,19 @@ PoncaPlotCLI::run(int argc, char **argv) {
.required()
.help("input file (.pts or .txt)");
program.add_argument("-o", "--output")
.required()
.help("output file (image)");
program.add_argument("-f", "--fitType")
.help("fit type: [" + namesStr + "]");

try {
program.parse_args(argc, argv);
auto inputPath = program.get("-i");
if (! inputPath.empty())
{
m_dataMgr->loadPointCloud(inputPath);
// load other properties
if( ! program.is_used("-o")) return false; // be sure that GUI is started.
}
}
catch (const std::exception& err) {
std::cout << err.what() << std::endl;
Expand Down

0 comments on commit 3c5623c

Please sign in to comment.