MCPcopy Create free account
hub / github.com/MITK/MITK / setupParser

Function setupParser

Modules/ModelFit/cmdapps/PixelDump.cpp:86–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84DumpPixelMapType dumpedPixels;
85
86void setupParser(mitkCommandLineParser& parser)
87{
88 // set general information about your MiniApp
89 parser.setCategory("Generic Analysis Tools");
90 parser.setTitle("Pixel Dumper");
91 parser.setDescription("MiniApp that allows to dump the pixel values of all passed files into a csv. The region of dumping can defined by a mask. All images (and mask) must have the same geometry.");
92 parser.setContributor("DKFZ MIC");
93 //! [create parser]
94
95 //! [add arguments]
96 // how should arguments be prefixed
97 parser.setArgumentPrefix("--", "-");
98 // add each argument, unless specified otherwise each argument is optional
99 // see mitkCommandLineParser::addArgument for more information
100 parser.beginGroup("Required I/O parameters");
101 parser.addArgument(
102 "inputs", "i", mitkCommandLineParser::StringList, "Input files", "list of the images that should be dumped.", us::Any(), false);
103 parser.addArgument("output",
104 "o",
105 mitkCommandLineParser::File,
106 "Output file",
107 "where to save the csv.",
108 us::Any(),
109 false, false, false, mitkCommandLineParser::Output);
110 parser.endGroup();
111
112 parser.beginGroup("Optional parameters");
113 parser.addArgument(
114 "mask", "m", mitkCommandLineParser::File, "Mask file", "Mask that defines the spatial image region that should be dumped. Must have the same geometry as the input images!", us::Any(), true, false, false, mitkCommandLineParser::Input);
115 parser.addArgument(
116 "captions", "c", mitkCommandLineParser::StringList, "Captions of image columns", "If provided the pixel columns of the csv will be named according to the passed values instead of using the image paths. Number of images and names must be equal.", us::Any(), false);
117 parser.addArgument("help", "h", mitkCommandLineParser::Bool, "Help:", "Show this help text");
118 parser.endGroup();
119 //! [add arguments]
120}
121
122bool configureApplicationSettings(std::map<std::string, us::Any> parsedArgs)
123{

Callers 1

mainFunction · 0.70

Calls 9

setCategoryMethod · 0.80
setContributorMethod · 0.80
setArgumentPrefixMethod · 0.80
beginGroupMethod · 0.80
addArgumentMethod · 0.80
endGroupMethod · 0.80
AnyClass · 0.50
setTitleMethod · 0.45
setDescriptionMethod · 0.45

Tested by

no test coverage detected