18 #include "cum_bac_clparser.h"
20 void parseOptions(
int argc,
char** argv , CUM_BAC_CLOPT *opt)
26 TCLAP::CmdLine cmd(
"CUM_BAC ",
' ',
"0.1" );
31 TCLAP::UnlabeledValueArg<std::string> filename(
"FileName",
"Name of data file",
true,
"NULL",
"std::string");
35 TCLAP::UnlabeledValueArg<int> filetype(
"Filetype",
"Type of data file",
true,9999,
"int");
39 TCLAP::UnlabeledValueArg<std::string> sito(
"Sito",
"Name of radar site",
true,
"NULL",
"std::string");
51 TCLAP::SwitchArg Stampe(
"s",
"StampeExtra",
"Stampe Extra per devel",
false);
53 TCLAP::SwitchArg VPR(
"V",
"VPR",
"Performe VPR correction",
false);
55 TCLAP::SwitchArg Quality(
"Q",
"Quality",
"Calculate quality",
false);
57 TCLAP::SwitchArg OdimFormat(
"O",
"Odim",
"Data used in ODIM format",
false);
59 TCLAP::SwitchArg Medium(
"M",
"MediumPulse",
"Use parameters for medium pulse",
false);
61 TCLAP::SwitchArg StaticMap(
"m",
"UseStaticMap",
"Use Static Map",
false);
63 TCLAP::SwitchArg Declut(
"D",
"Declut",
"Performe only static declutter correction",
false);
65 TCLAP::SwitchArg Class(
"C",
"Class",
"Evaluate stratiform-convective classification",
false);
67 TCLAP::SwitchArg Clean(
"c",
"Clean",
"Performe Interference and second-trip cleaning",
false);
69 TCLAP::SwitchArg BeamBlocking(
"B",
"BeamBlocking",
"Performe BeamBlocking correction",
false);
70 cmd.add(BeamBlocking);
71 TCLAP::SwitchArg BlocNoCor(
"b",
"BlocNoCor",
"Questo non so cosa sia",
false);
73 TCLAP::SwitchArg Anaprop(
"A",
"Anaprop",
"Performe Anaprop identification algorithm",
false);
76 TCLAP::SwitchArg IntermediateProd(
"I",
"SaveIntermediateProduct",
"Save additional product at intermediate processing level's",
false);
77 cmd.add(IntermediateProd);
78 TCLAP::SwitchArg SaveBothRanges(
"S",
"SaveBothRanges",
"Save products at both processing ranges (128km ad 256 km)",
false);
79 cmd.add(SaveBothRanges);
80 TCLAP::SwitchArg SaveFullResProd(
"F",
"SaveFullResProd",
"Save product at fullsize resolution",
false);
81 cmd.add(SaveFullResProd);
95 opt->filename=filename.getValue();
96 opt->filetype=filetype.getValue();
97 opt->sito=sito.getValue();
99 opt->do_medium=Medium.getValue();
100 opt->do_anaprop=Anaprop.getValue();
101 opt->do_quality=Quality.getValue();
102 opt->do_beamblocking=BeamBlocking.getValue();
103 opt->do_declut=Declut.getValue();
104 opt->do_bloccor=BlocNoCor.getValue();
105 opt->do_vpr=VPR.getValue();
106 opt->do_clean=Clean.getValue();
107 opt->do_class=Class.getValue();
108 opt->do_devel=Stampe.getValue();
109 opt->do_readStaticMap=StaticMap.getValue();
110 opt->data_in_odim=OdimFormat.getValue();
111 opt->do_intermediateProd=IntermediateProd.getValue();
112 opt->do_SaveBothRanges=SaveBothRanges.getValue();
113 opt->do_SaveFullRes=SaveFullResProd.getValue();
115 }
catch ( TCLAP::ArgException& e )
116 { std::cout <<
"ERROR: " << e.error() <<
" " << e.argId() << std::endl; }
122 void PrintOptions(
struct CUM_BAC_CLOPT *opt){
124 std::cout <<
"Filename :"<<opt->filename.c_str()<<std::endl;
125 std::cout <<
"Filetype :"<<opt->filetype<<std::endl;
126 std::cout <<
"Sito :"<<opt->sito.c_str()<<std::endl;
127 std::cout <<
"do_medium :"<<opt->do_medium<<std::endl;
128 std::cout <<
"do_quality :"<<opt->do_quality<<std::endl;
129 std::cout <<
"do_beamblocking :"<<opt->do_beamblocking<<std::endl;
130 std::cout <<
"do_declutter :"<<opt->do_declut<<std::endl;
131 std::cout <<
"do_bloccor"<<opt->do_bloccor<<std::endl;
132 std::cout <<
"do_vpr"<<opt->do_vpr<<std::endl;
133 std::cout <<
"do_clean"<<opt->do_clean<<std::endl;
134 std::cout <<
"do_class :"<<opt->do_class<<std::endl;
135 std::cout <<
"do_devel :"<<opt->do_devel<<std::endl;
136 std::cout <<
"do_readStaticMap"<<opt->do_readStaticMap<<std::endl;
137 std::cout <<
"do_intermediateProd"<<opt->do_intermediateProd<<std::endl;
138 std::cout <<
"do_SaveBothRanges"<< opt->do_SaveBothRanges <<std::endl;
139 std::cout <<
"do_SaveFullRes"<< opt->do_SaveFullRes <<std::endl;