47 while (std::getline(
inifile, line))
57 if (line[0] ==
';' || line[0] ==
'#')
62 if (line.front() ==
'[' && line.back() ==
']')
68 size_t pos = line.find(
'=');
70 if (
pos != std::string::npos &&
pos > 1)
73 const std::string
key = line.substr(0,
pos);
74 const std::string value = line.substr(
pos + 1);
170 std::vector<std::string> keys;
176 keys.push_back(
key.first);
188 std::cout <<
section.first <<
"/" <<
key.first <<
"=" <<
key.second << std::endl;
reads and parse an ini file
std::vector< std::string > GetKeys(const std::string §ion) const
returns a vector of all know keys in given section
std::vector< std::string > GetSections() const
returns a vector of all know sections
std::map< std::string, IniValues > m_iniValues
map to store the information from different sections
int Read(const std::string &file)
Reads the given ini file.
bool HasKey(const std::string §ion, const std::string &key) const
Checks if given section/key exists.
void PrintValues() const
for debugging purpose, print all values
std::string GetKey(const std::string §ion, const std::string &key, const std::string &defaultValue) const
returns the value of the given section/key or default value if it does not exists
std::string toupper(const std::string &s)
std::string StrTrim(const std::string &str)
remove trailing and leading white spaces and tabs
bool stringToInt(const std::string &s, int &val)
convert string to integer value, returns true, if sucessful
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.