Inshaping: include/Setting.h Source File

Inshaping

Inshaping  0.1
Setting.h
Go to the documentation of this file.
1 #pragma once
2 #include<iostream>
3 #include<fstream>
4 #include<string>
5 #include<vector>
6 #include<anyarg.h>
7 
8 namespace Inshape
9 {
12  #define HEAD_FILENAME "HEAD_FILENAME"
13  #define BODY_FILENAME "BODY_FILENAME"
14  #define SUB_HEAD "SUB_HEAD"
15  #define SUB_BODY "SUB_BODY"
16  #define FACE_FILENAME "FACE_FILENAME"
17  #define FINAL_PARAM "FINAL_PARAM"
18 
19 
20  struct ParamItem
21  {
22  double theta;//�㵽��IJ��� double lamda_min;//������LAMDA,LAMDAԽ��Խ���� double lamda_max; //������LAMDA,LAMDAԽ��Խ���� double eta;//������ ETA ETAԽ��Խ�ܹ������� double threshold;//������ ��Ӧ��������� THRESHOLD std::string toString(int i) { return std::to_string(theta) + "_" + std::to_string(lamda_min) + "_" + std::to_string(lamda_max) + "_" + std::to_string(eta) + "_" + std::to_string(threshold) + std::to_string(i); } }; struct Param { std::vector<ParamItem> paramItems; ParamItem finalParam; void clear() { paramItems.clear(); } }; class Setting:public Anyarg { public: std::string headFilename; std::string faceFilename; std::string bodyFilename; std::string outputFilename; std::string subHead; std::string subBody; Param param; bool preAligned; //�Ƿ�Ԥ�ȶ�׼�� true ����Ӧ�ø�����׼ bool outputIntermediate; bool useMatch; bool readInputTemplate(std::string filename); bool readMatch(std::string filename); bool readParam(std::string filename); Setting(); // parsing command line, collect command line arguments bool parse_argv(int argc, char** argv); }; /*@}*/ }
23  double lamda_min;//������LAMDA,LAMDAԽ��Խ���� double lamda_max; //������LAMDA,LAMDAԽ��Խ���� double eta;//������ ETA ETAԽ��Խ�ܹ������� double threshold;//������ ��Ӧ��������� THRESHOLD std::string toString(int i) { return std::to_string(theta) + "_" + std::to_string(lamda_min) + "_" + std::to_string(lamda_max) + "_" + std::to_string(eta) + "_" + std::to_string(threshold) + std::to_string(i); } }; struct Param { std::vector<ParamItem> paramItems; ParamItem finalParam; void clear() { paramItems.clear(); } }; class Setting:public Anyarg { public: std::string headFilename; std::string faceFilename; std::string bodyFilename; std::string outputFilename; std::string subHead; std::string subBody; Param param; bool preAligned; //�Ƿ�Ԥ�ȶ�׼�� true ����Ӧ�ø�����׼ bool outputIntermediate; bool useMatch; bool readInputTemplate(std::string filename); bool readMatch(std::string filename); bool readParam(std::string filename); Setting(); // parsing command line, collect command line arguments bool parse_argv(int argc, char** argv); }; /*@}*/ }
24  double lamda_max; //������LAMDA,LAMDAԽ��Խ���� double eta;//������ ETA ETAԽ��Խ�ܹ������� double threshold;//������ ��Ӧ��������� THRESHOLD std::string toString(int i) { return std::to_string(theta) + "_" + std::to_string(lamda_min) + "_" + std::to_string(lamda_max) + "_" + std::to_string(eta) + "_" + std::to_string(threshold) + std::to_string(i); } }; struct Param { std::vector<ParamItem> paramItems; ParamItem finalParam; void clear() { paramItems.clear(); } }; class Setting:public Anyarg { public: std::string headFilename; std::string faceFilename; std::string bodyFilename; std::string outputFilename; std::string subHead; std::string subBody; Param param; bool preAligned; //�Ƿ�Ԥ�ȶ�׼�� true ����Ӧ�ø�����׼ bool outputIntermediate; bool useMatch; bool readInputTemplate(std::string filename); bool readMatch(std::string filename); bool readParam(std::string filename); Setting(); // parsing command line, collect command line arguments bool parse_argv(int argc, char** argv); }; /*@}*/ }
25  double eta;//������ ETA ETAԽ��Խ�ܹ�������
26  double threshold;//������ ��Ӧ��������� THRESHOLD
27  std::string toString(int i)
28  {
29  return std::to_string(theta) + "_" + std::to_string(lamda_min) + "_" + std::to_string(lamda_max) + "_" + std::to_string(eta) + "_" + std::to_string(threshold) + std::to_string(i);
30  }
31  };
32 
33  struct Param
34  {
35  std::vector<ParamItem> paramItems;
37 
38  void clear()
39  {
40  paramItems.clear();
41  }
42  };
43 
44  class Setting:public Anyarg
45  {
46  public:
47  std::string headFilename;
48  std::string faceFilename;
49 
50  std::string bodyFilename;
51 
52  std::string outputFilename;
53 
54 
55  std::string subHead;
56  std::string subBody;
57 
59 
60 
61  bool preAligned; //�Ƿ�Ԥ�ȶ�׼�� true ����Ӧ�ø�����׼
63  bool useMatch;
64 
65  bool readInputTemplate(std::string filename);
66 
67  bool readMatch(std::string filename);
68 
69  bool readParam(std::string filename);
70 
71  Setting();
72 
73  // parsing command line, collect command line arguments
74  bool parse_argv(int argc, char** argv);
75 
76  };
77 
78 
79 
80 
82 }
double theta
Definition: Setting.h:22
bool readParam(std::string filename)
double lamda_max
Definition: Setting.h:24
Param param
Definition: Setting.h:58
void clear()
Definition: Setting.h:38
bool outputIntermediate
Definition: Setting.h:62
Definition: AfterProcess.h:9
std::string subHead
Definition: Setting.h:55
Definition: Setting.h:20
std::vector< ParamItem > paramItems
Definition: Setting.h:35
std::string subBody
Definition: Setting.h:56
bool readMatch(std::string filename)
bool parse_argv(int argc, char **argv)
std::string headFilename
Definition: Setting.h:47
A simple option parser for C++.
bool preAligned
Definition: Setting.h:61
std::string toString(int i)
Definition: Setting.h:27
double lamda_min
Definition: Setting.h:23
std::string bodyFilename
Definition: Setting.h:50
Definition: Setting.h:44
std::string outputFilename
Definition: Setting.h:52
double eta
Definition: Setting.h:25
double threshold
Definition: Setting.h:26
std::string faceFilename
Definition: Setting.h:48
Use this class to define program options and parse command line arguments.
Definition: anyarg.h:97
bool readInputTemplate(std::string filename)
ParamItem finalParam
Definition: Setting.h:36
Definition: Setting.h:33
bool useMatch
Definition: Setting.h:63
Generated by   doxygen 1.8.14