本文整理汇总了C++中Options::GetStringVector方法的典型用法代码示例。如果您正苦于以下问题:C++ Options::GetStringVector方法的具体用法?C++ Options::GetStringVector怎么用?C++ Options::GetStringVector使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Options
的用法示例。
在下文中一共展示了Options::GetStringVector方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[]) {
// show which dimension this executable is handling
cout << argv[0] << " with dimension = " << __Dim << endl;
Options opts;
opts.addOption("-o", "Specify a filename for an output image", SO_REQ_SEP);
opts.addOption("--fusion", "label fusion from a config", "`--fusion config-file output-file target-image`", SO_REQ_SEP);
opts.addOption("--overlap", "Compute the overlap ratio (dice|jaccard). This option can take two or arguments. The first argument is a gold standard, and other arguments are multiple number of label images to be compared.", "--overlap dice output-text ref1 ref2-1 ref2-2 ... ref2-n", SO_REQ_SEP);
opts.addOption("--p2mat", "point list to matrix", SO_NONE);
opts.addOption("--slice", "extract a slice from 3d volume", "--slice dim index imagefile outputfile", SO_NONE);
opts.addOption("--imageMerge", "merge 2D images into a 3d volume (--imageMerge output input1 input2 ...)", SO_REQ_SEP);
opts.addOption("--qa", "extract a slice with a label map", SO_NONE);
opts.addOption("--config", "[file] use this config file", SO_REQ_SEP);
opts.addOption("--demons", "run Demons registration", SO_NONE);
opts.addOption("--separate", "[input] [x] [y] [z] ... separate vector images into individual image files", SO_NONE);
opts.addOption("--rx", "registration experiments ", SO_NONE);
opts.addOption("--dots", "--rx --dots generate a series of gaussian dot images", SO_NONE);
opts.addOption("--sigma", "sigma value [double]", "--sigma 0.8", SO_REQ_SEP);
opts.addOption("--entropyImage", "Compute an entropy image from a set of given images", "`--entropyImage -o output.nrrd input1.nrrd input2.nrrd ...`", SO_NONE);
opts.addOption("--test", "Run in a test mode. The test mode is context sensitive depending on the given argument. For example, if `--entropyImage --test` is given, it will automatically provide a set of input images and produce an output into a specific directory.", SO_NONE);
opts.addOption("--distanceMap", "Compute the Danielsson's distance map. This will also generate distmag.nrrd, x.nrrd, y.nrrd, and z.nrrd that stores the component of the vector distance map for debugging purpose.", "--distanceMap input output-vector output-magnitude", SO_NONE);
opts.addOption("--help", "print this message", SO_NONE);
opts.ParseOptions(argc, argv, NULL);
StringVector& args = opts.GetStringVector("args");
if (opts.GetBool("--help") || opts.GetBool("-h")) {
cout << "## ParticleRun Command Line Options" << endl;
opts.PrintUsage();
return 0;
}
particle2mat(opts, args);
doSlice(opts, args);
doSeparate(opts, args);
if (opts.GetBool("--qa")) {
executeQARunner(opts, args);
} else if (opts.GetString("--imageMerge", "") != "" && args.size() > 0) {
doMerge(opts, args);
} else if (opts.GetBool("--demons")) {
executeDemonsRunner(opts, args);
} else if (opts.GetBool("--rx")) {
executeRxRunner(opts, args);
} else if (opts.GetString("--fusion", "") != "") {
executeLabelFusionRunner(opts, args);
} else if (opts.GetBool("--entropyImage")) {
executeEntropyImage(opts, args);
} else if (opts.GetString("--overlap") == "dice" || opts.GetString("--overlap") == "jaccard") {
executeVolumeOverlaps(opts, args);
} else if (opts.GetBool("--distanceMap")) {
executeComputeDistanceMap(opts, args);
} else {
executeParticleRunner(opts, args);
}
}