MCPcopy Create free account
hub / github.com/LuminanceHDR/LuminanceHDR / execCommandLineParams

Method execCommandLineParams

src/MainCli/commandline.cpp:127–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127int CommandLineInterfaceManager::execCommandLineParams() {
128 // Declare the supported options.
129 namespace po = boost::program_options;
130 po::variables_map vm;
131
132 po::options_description desc(tr("Usage: %1 [OPTIONS]... [INPUTFILES]...")
133 .arg(argv[0])
134 .toUtf8()
135 .constData());
136 desc.add_options()("help,h", tr("Display this help.").toUtf8().constData())
137 ("version,V", tr("Display program version.").toUtf8().constData())
138 ("verbose,v", tr("Print more messages during execution.").toUtf8().constData())
139 ("cameras,c", tr("Print a list of all supported cameras.").toUtf8().constData())
140 ("align,a", po::value<std::string>(), tr("[AIS|MTB] Align Engine to use during HDR creation (default: no "
141 "alignment).").toUtf8().constData())
142 ("ev,e", po::value<std::string>(), tr("EV1,EV2,... Specify numerical EV values (as many as INPUTFILES).")
143 .toUtf8().constData())
144 ("savealigned,d", po::value<std::string>(), tr("prefix Save aligned images to files which names start with prefix")
145 .toUtf8().constData())
146 //
147 ("load,l", po::value<std::string>(), tr("HDR_FILE Load an HDR instead of creating a new one.")
148 .toUtf8().constData())
149 ("save,s", po::value<std::string>(), tr("HDR_FILE Save to a HDR file format. (default: don't save)")
150 .toUtf8().constData())
151 ("gamma,g", po::value<float>(&tmopts->pregamma),
152 tr("VALUE Gamma value to use during tone mapping. (default: 1) ").toUtf8().constData())
153 ("saturation,S", po::value<float>(&tmopts->postsaturation),
154 tr("VALUE Saturation value to use after tone mapping. (default: 1) ").toUtf8().constData())
155 ("postgamma,G", po::value<float>(&tmopts->postgamma),
156 tr("VALUE Gamma value to use after tone mapping. (default: 1) ").toUtf8().constData())
157 ("resize,r", po::value<int>(&tmopts->xsize), tr("VALUE Width you want to resize your HDR to (resized "
158 "before gamma and tone mapping)").toUtf8().constData())
159
160 ("output,o", po::value<std::string>(), tr("LDR_FILE File name you want to save your tone mapped LDR to.")
161 .toUtf8().constData())("autoag,t", po::value<float>(&threshold), tr("THRESHOLD Enable auto anti-ghosting with "
162 "given threshold. (0.0-1.0)").toUtf8().constData())
163 ("autolevels,b", tr("Apply autolevels correction after tonemapping.").toUtf8().constData())
164 ("createwebpage,w", tr("Enable generation of a webpage with embedded HDR viewer.").toUtf8().constData())
165 ("proposedldrname,p", po::value<std::string>(&ldrExtension),
166 tr("FILE_EXTENSION Save LDR file with a name of the form "
167 "first-last_tmparameters.extension.").toUtf8().constData())
168 ("proposedhdrname,z", po::value<std::string>(&hdrExtension), tr("FILE_EXTENSION Save HDR file with a name of the form "
169 "first-last_HdrCreationModel.extension.").toUtf8().constData());
170
171 po::options_description hdr_desc(
172 tr("HDR creation parameters - you must either load an existing HDR "
173 "file "
174 "(via the -l option) "
175 "or specify INPUTFILES to create a new HDR")
176 .toUtf8()
177 .constData());
178 hdr_desc.add_options()(
179 "hdrWeight", po::value<std::string>(),
180 tr("weight = triangular|gaussian|plateau|flat (Default is triangular)")
181 .toUtf8()
182 .constData())("hdrResponseCurve", po::value<std::string>(),
183 tr("response curve = from_file|linear|gamma|log|srgb "
184 "(Default is linear)")

Callers 1

mainFunction · 0.80

Calls 9

printErrorAndExitFunction · 0.85
toFloatWithErrMsgFunction · 0.85
printIfVerboseFunction · 0.85
runMethod · 0.80
appendMethod · 0.80
setMethod · 0.80
countMethod · 0.45
resetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected