EventVisionLibrary / evl

Event Vision Library (EVL)
BSD 3-Clause "New" or "Revised" License
26 stars 4 forks source link

Options for image interface #37

Open shiba24 opened 6 years ago

shiba24 commented 6 years ago

Now, image interface support is limited to within buffer_csv. We can add options for the functions using boost::program_options

shiba24 commented 6 years ago

example:


    namespace po = boost::program_options;
    po::options_description desc("Allowed options");
    desc.add_options()
        ("help", "produce help message")
        ("event-file,f", po::value<std::string>(), "File that contains events")
        ("width,w", po::value<int>()->default_value(240),"Width")
        ("height,h", po::value<int>()->default_value(180),"Height")
        ("output-folder,o", po::value<std::string>()->default_value("./"),"Folder where all the file will be written")
    ;
    po::positional_options_description p;
    p.add("event-file", -1);

    po::variables_map vm;
    po::store(po::command_line_parser(argc, argv).
              options(desc).positional(p).run(), vm);
    po::notify(vm);

    int width = vm["width"].as<int>();