29 const std::string PARAM_BENCHMARKING =
"enable-benchmark";
30 const std::string PARAM_ENGINE =
"engine";
31 const std::string PARAM_HTTP_SERVER =
"http-server";
32 const std::string PARAM_IMAGE_STREAM_FPS =
"image-stream-fps";
33 const std::string PARAM_INPUT_PATHS =
"input-paths";
34 const std::string PARAM_JPEG_COMPRESSION =
"jpeg-compression";
35 const std::string PARAM_MAX_RENDER_FPS =
"max-render-fps";
36 const std::string PARAM_MODULE =
"module";
37 const std::string PARAM_PARALLEL_RENDERING =
"parallel-rendering";
38 const std::string PARAM_PLUGIN =
"plugin";
39 const std::string PARAM_WINDOW_SIZE =
"window-size";
40 const std::string PARAM_ENV_MAP =
"env-map";
41 const std::string PARAM_SANDBOX_PATH =
"sandbox-path";
42 #ifdef BRAYNS_USE_FFMPEG
43 const std::string PARAM_VIDEOSTREAMING =
"videostreaming";
46 const size_t DEFAULT_WINDOW_WIDTH = 800;
47 const size_t DEFAULT_WINDOW_HEIGHT = 600;
48 const size_t DEFAULT_JPEG_COMPRESSION = 90;
49 const std::string DEFAULT_SANDBOX_PATH =
"/gpfs/bbp.cscs.ch/project";
56 , _windowSize(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT)
57 , _jpegCompression(DEFAULT_JPEG_COMPRESSION)
58 , _sandBoxPath(DEFAULT_SANDBOX_PATH)
61 (PARAM_ENGINE.c_str(), po::value<std::string>(&
_engine),
62 "Engine name [ospray|optix]")
63 (PARAM_MODULE.c_str(), po::value<strings>(&
_modules)->composing(),
64 "OSPRay module name [string]")
65 (PARAM_HTTP_SERVER.c_str(), po::value<std::string>(&
_httpServerURI),
67 (PARAM_INPUT_PATHS.c_str(), po::value<strings>(&
_inputPaths),
68 "List of files/folders to load data from")
69 (PARAM_PLUGIN.c_str(), po::value<strings>()->composing(),
70 "Dynamic plugin to load from LD_LIBRARY_PATH; "
71 "can be repeated to load multiple plugins. "
72 "Arguments to plugins can be added by inserting a space followed by "
73 "the arguments like: --plugin 'myPluginName arg0 arg1'")
74 (PARAM_WINDOW_SIZE.c_str(), po::fixed_tokens_value<uints>(2, 2),
75 "Window size [uint uint]")
76 (PARAM_BENCHMARKING.c_str(), po::bool_switch(&
_benchmarking)->default_value(
false),
77 "Enable benchmarking")
79 "JPEG compression rate (100 is full quality) [int]")
80 (PARAM_PARALLEL_RENDERING.c_str(), po::bool_switch(&
_parallelRendering)->default_value(
false),
81 "Enable parallel rendering, equivalent to --osp:mpi")
82 (CAMERA_PROPERTY_STEREO.name.c_str(), po::bool_switch(&
_stereo)->default_value(DEFAULT_CAMERA_STEREO),
83 "Enable stereo rendering")
85 "Image stream FPS (60 default), [int]")
86 (PARAM_MAX_RENDER_FPS.c_str(), po::value<size_t>(&
_maxRenderFPS),
88 (PARAM_ENV_MAP.c_str(), po::value<std::string>(&
_envMap),
89 "Path to environment map")(PARAM_SANDBOX_PATH.c_str(), po::value<std::string>(&
_sandBoxPath),
90 "Path to sandbox directory")
91 #ifdef BRAYNS_USE_FFMPEG
92 (PARAM_VIDEOSTREAMING.c_str(), po::bool_switch(&
_useVideoStreaming)->default_value(
false),
93 "Use videostreaming over websockets instead of JPEG")
102 if (vm.count(PARAM_WINDOW_SIZE))
104 uints values = vm[PARAM_WINDOW_SIZE].as<
uints>();
static std::string asString(const bool flag)
po::options_description _parameters
void parse(const po::variables_map &vm) final
std::vector< std::string > _modules
std::string _httpServerURI
po::positional_options_description _positionalArgs
void markModified(const bool triggerCallback=true)