| 15 | namespace po = boost::program_options; |
| 16 | |
| 17 | void getParameters(int argc, char** argv, std::string& input, std::string& output, bool& autoscale) |
| 18 | { |
| 19 | po::options_description desc("Allowed options: "); |
| 20 | desc.add_options() |
| 21 | ("output,o", po::value<std::string>(&output)->required(), "output file") |
| 22 | ("input,i", po::value<std::string>(&input)->required(), "input file") |
| 23 | ("autoscale,a", po::value<bool>(&autoscale)->default_value(false), "auto-scale") |
| 24 | ; |
| 25 | |
| 26 | po::variables_map vm; |
| 27 | po::store(po::command_line_parser(argc, argv). |
| 28 | options(desc).allow_unregistered().run(), vm); |
| 29 | po::notify(vm); |
| 30 | } |
| 31 | |
| 32 | int main(int argc, char** argv) |
| 33 | { |