Basic Image AlgorithmS Library
2.8.0
|
This class Param provides generic support for parameters. More...
#include <Utils/Param.hh>
Public Member Functions | |
void | AddDebugLevel (const long int lv) |
void | AddDebugLevel (const std::string &name) |
bool * | AddParamBool (const std::string &name, const std::string &help, bool deflt=false, char cmdshort=0, int Group=GRP_NOSHOW) |
double * | AddParamDouble (const std::string &name, const std::string &help, double deflt=0.0, double min=-DBL_MAX, double max=DBL_MAX, char cmdshort=0, int Group=GRP_NOSHOW) |
int * | AddParamEnum (const std::string &name, const std::string &help, const std::vector< std::string > &enums, const int deflt=0, const std::vector< int > *IDs=NULL, const char cmdshort=0, const int Group=GRP_NOSHOW) |
int * | AddParamInt (const std::string &name, const std::string &help, int deflt=0, int min=std::numeric_limits< int >::min(), int max=std::numeric_limits< int >::max(), char cmdshort=0, int Group=GRP_NOSHOW) |
For all adding routines: More... | |
std::string * | AddParamString (const std::string &name, const std::string &help, std::string deflt="", char cmdshort=0, int Group=GRP_NOSHOW) |
BIAS::Vector< double > * | AddParamVecDbl (const std::string &name, const std::string &help, const BIAS::Vector< double > &deflt, char cmdshort=0, int Group=GRP_NOSHOW) |
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..." | |
BIAS::Vector< double > * | AddParamVecDbl (const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW) |
The same as above, but default is given by a string, syntax is as at command line "v_0 v_1 v_2", don't set empty string, cause the length is determined also by the number of values More... | |
BIAS::Vector< int > * | AddParamVecInt (const std::string &name, const std::string &help, const BIAS::Vector< int > &deflt, char cmdshort=0, int Group=GRP_NOSHOW) |
Add a parameter that expects a string on command line like "<value0> <value1> <value2> ..." | |
BIAS::Vector< int > * | AddParamVecInt (const std::string &name, const std::string &help, const std::string &deflt, char cmdshort=0, int Group=GRP_NOSHOW) |
The same as other AddParamVecInt(), but default is given by a string, syntax is as at command line "v_0 v_1 v_2". More... | |
bool | CheckParam (const std::string &name) |
Check if parameter has already been added. More... | |
void | ClearAllParams () |
empties internal datastructures More... | |
bool | DebugLevelIsSet (const long int lv) const |
bool | DebugLevelIsSet (const std::string &name) const |
void | DisableDestructorWarning () |
Uses this just before end of your program to avoid error from destructor. More... | |
int | GetDebugLevel () const |
std::ostream & | GetDebugStream () const |
void | GetDebugStream (std::ostream &os) const |
int | GetFreeGroupID () |
returns unused group id More... | |
int | GetGroupID (const std::string &name) |
returns group id of parameter with name More... | |
int | GetGroupIDForGroupName (const std::string &name) |
std::string | GetGroupName (const int group_id) |
gets the name of a group More... | |
bool * | GetParamBool (const std::string &name) const |
bool * | GetParamBoolByIndex (const int i) const |
Get a Param-value by Index. More... | |
double * | GetParamDouble (const std::string &name) const |
double * | GetParamDoubleByIndex (const int i) const |
Get a Param-value by Index. More... | |
int * | GetParamEnum (const std::string &name) const |
int * | GetParamInt (const std::string &name) const |
int * | GetParamIntByIndex (const int i) const |
Get a Param-value by Index. More... | |
std::string * | GetParamString (const std::string &name) const |
std::string * | GetParamStringByIndex (const int i) const |
Get a Param-value by Index. More... | |
BIAS::Vector< double > * | GetParamVecDbl (const std::string &name) const |
BIAS::Vector< int > * | GetParamVecInt (const std::string &name) const |
int | GetSizeOfLongestParamName () |
returns the size of the longest param name not marked as enhanced or hidden More... | |
int | GetSizeOfLongestParamValueString () |
returns the size of the longest param value string not marked as enhanced or hidden More... | |
bool | GetWriteFlag () |
bool | IsUsedGroupID (const int group_id) |
returns if the group id is used More... | |
long int | Name2DebugLevel (const std::string &name) const |
looks up a debuglevel in the internal map, returns 0 if not found More... | |
long int | NewDebugLevel (const std::string &name) |
creates a new debuglevel More... | |
Param (bool DisableDestructorWarning=false) | |
int | ParseCommandLine (int &argc, char *argv[]) |
scan command line arguments for valid parameters More... | |
void | PrintDebugLevel (std::ostream &os=std::cout) const |
int | ReadParameter (const std::string &filename) |
read values for parameters from file More... | |
int | ReadParameterXML (const std::string &filename) |
read values for parameters from xml-file More... | |
int | RegisterCallbackObject (const std::string &name, ParamCallbackInterface *obj) |
void | RemoveDebugLevel (const long int lv) |
void | RemoveDebugLevel (const std::string &name) |
void | SetDebugLevel (const long int lv) |
void | SetDebugLevel (const std::string &name) |
void | SetDebugStream (const std::ostream &os) |
void | SetDefaults () |
sets all entries to their initially (AddParam) given default values More... | |
int | SetEnhancedFlag (const std::string &name, bool enhanced) |
if a parametr is marked as enhanced, it is hidden from the naive user More... | |
int | SetGroupName (const int group_id, const std::string &name) |
sets the name for a group More... | |
int | SetHiddenFlag (const std::string &name, bool hidden) |
if a parametr is marked as hidden, it is obsolete and hidden for all users, use this for parameters overwritten by caller class More... | |
bool * | SetParamBool (const std::string &name, const bool &value) |
double * | SetParamDouble (const std::string &name, const double &value) |
int * | SetParamEnum (const std::string &name, const int &value) |
set the enum to the ID 'value' More... | |
int * | SetParamEnum (const std::string &name, const std::string &value) |
set the enum to the ID corresponding to the string 'value' More... | |
int | SetParameterWriteToFile (const std::string &name, bool writeToFile) |
int * | SetParamInt (const std::string &name, const int &value) |
std::string * | SetParamString (const std::string &name, const std::string &value) |
BIAS::Vector< double > * | SetParamVecDbl (const std::string &name, const BIAS::Vector< double > &value) |
BIAS::Vector< int > * | SetParamVecInt (const std::string &name, const BIAS::Vector< int > &value) |
virtual int | SetRangeInt (const std::string &name, const int min, const int max) |
Set [Min,Max] as new range, especially usefull in derived class PramGUI More... | |
int | SetShortCommand (const std::string &name, const char cmd) |
Add a short commandline switch to an existing parameter. More... | |
void | SetWriteOptions (bool indent, bool comments, bool enhanced) |
void | ShowData (std::ostream &os=std::cout, int grp=GRP_ALL, bool showenhanced=true) |
print all data in group grp including current values to os if grp = GRP_ALL, print all values if showenhanced = false, parameters marked as enhanced are not shown More... | |
void | ShowDebugLevel (std::ostream &os=std::cout) const |
prints all internally known debuglevels More... | |
std::vector< int > | UniqueSortedGroups () |
Returns a vector of all group IDs (unique) in ascending order. More... | |
int | UpdateParameter (int &argc, char *argv[], const std::string &default_filename) |
update all arguments from command line and parameter file More... | |
void | Usage (std::ostream &os=std::cout) |
print Help-Information to stdout More... | |
int | WriteParameter (const std::string &filename) |
store complete set of parameter in file if write_comments is set, alo the help strings are written to the file if show_enhanced is set, also parameters marked as enhanced are written More... | |
int | WriteParameterXML (const std::string &filename) |
int | WriteRunMe (const std::string &filename) |
writes complete command line including program name and unknown command line options, no defaults, no params read from file More... | |
virtual | ~Param () |
Static Public Member Functions | |
static long int | GetGlobalDebugLevel () |
static int | ParseListFile (const std::string &ListFileName, std::vector< std::string > &LinesInFile) |
Extracts lines from passed file. More... | |
static void | SetGlobalDebugLevel (long int lev) |
Protected Member Functions | |
long | ConsumeNextFreeDebuglevel_ () |
returns the next available debuglevel More... | |
std::map< const std::string, BIAS::ParamTypeBase * > & | GetParamMap () |
const std::map< const std::string, BIAS::ParamTypeBase * > & | GetParamMap () const |
Protected Attributes | |
long int | _liDebugLevel |
long int | _liNextDebugLevel |
new concept, debuglevel are managed here in the debug class More... | |
std::map< std::string, long int > | _String2Debuglevel |
std::vector< std::string > | ArgV_ |
bool | DestructorWarning_ |
std::vector< std::string > | GroupNames_ |
struct option * | longopts |
bool | WriteComments_ |
bool | WriteEnhanced_ |
bool | WriteFlagSet_ |
bool | WriteIndent_ |
Static Protected Attributes | |
static std::ostream | _zDebugStream |
static long int | GlobalDebugLevel = 0 |
This class Param provides generic support for parameters.
This is the documentation for the BIAS::Param and the BIAS::ParamGUI classes.
The idea behind the Param object is a common class to register all program parameters in. These parameters can be set from the command line, read and written to a file or be edited in a graphical interface that is programmed using the wxWidgets framework toolkit.
There are the following seven parameter types:
At first you create your instance of the Param oder ParamGUI object in your application. Afterwards you register your parameters by using the AddParam... methods corresponding to each of the types above:
The methods are
Each method has the parameters name, a help-string, a default-value, a short-command and a group ID as parameters. The name must be unique! An error is displayed if you add a new parameter with an already existing name. The help-string should describe the command in a short way. If you use the short-command, the parameter can be set at the command line with -<short-command> additionally to –<parameter-name>. Using the group ID you can put parameters of similar meaning in single groups, which is useful for visualization. The first four parameter types come along with standard default values. For the vector types you must provide an initial vector when adding a new parameter. When setting new vectors later in your program, the vector must be of the size given by the initial one. Using the method ParseCommandLine you can set the values for the registered parameters from the command line. Also you can use the default parameters 'readconfig' and 'writeconfig' to read or write a configuration from/to a file.
In your program you can use the GetParam... and SetParam... methods to receive a pointer to the data or to set new values for the parameters.
The BIAS::ParamGUI class is derived from the BIAS::Param class and provides the four methods
GetPanel, GetDialog, GetNotebook and GetFrame.
The GetPanel method returns a pointer to a wxPanel where the widgets for the parameters belonging to the given group are placed.
The GetNotebook method returns a pointer to a wxNotebook where on each notebook page is placed a panel with the parameters of one group.
These two can be placed in your GUI application as you like to. If you want a standalone frame with the notebook inside you use the GetFrame method.
The GetFrame method returns a pointer to a wxFrame in which a wxNotebook with all groups of parameters is embedded.
A big question about this object is why pointers are returned by the Add-, Get- and Set-methods. Well, is it wanted, that the data is only stored at one location and that is the Param object, so if you are interested in a value, you get the pointer to it.
Classes:
BIAS::ParamTypeBase | +– BIAS::ParamTypeInt | +– BIAS::ParamTypeBool | +– BIAS::ParamTypeString | +– BIAS::ParamTypeDouble | +– BIAS::ParamTypeVecDbl | +– BIAS::ParamTypeVecInt | +– BIAS::ParamTypeEnum
BIAS::Param | +– BIAS::ParamGUI
STL maps:
In BIAS::Param the main data struct holding the parameter data is a STL map. The key-value-pairs are of the type string,ParamTypeBase*.
The key-string holds the name of the parameter which is also stored in the parameter type class.
The ParamTypeEnum class holds another STL map with key of type string and value of type int. This is used for easier name->number translation.
In the GUI class also has a STL map of type unsigned int,struct ItemAndWidget to map event IDs to the corresponding control widget and parameter data.
Note about bool: bool options can be used on the cmdl as follow: -b -> result in "true" –bool=true -> result in "true" –bool=<any other="" string>=""> -> result in "false" –bool <any string>=""> -> Not allowed.
|
explicit |
|
inlineinherited |
Definition at line 355 of file Debug.hh.
Referenced by BIAS::GLProjectionParametersBase::AddDebugLevel(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::FilterBase< InputStorageType, OutputStorageType >::FilterBase(), BIAS::ShowCamWxVideoSourceFactory::OpenDevice(), and BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph().
|
inlineinherited |
bool * Param::AddParamBool | ( | const std::string & | name, |
const std::string & | help, | ||
bool | deflt = false , |
||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
Definition at line 305 of file Param.cpp.
References BIAS::ParamTypeBool::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeBool::value_, and BIAS::ParamTypeBase::WriteToFile_.
Referenced by BIAS::GenSynthMatches::_AddParameter(), and BIAS::IOUtils::ParseCommandLineEvalHelp().
double * Param::AddParamDouble | ( | const std::string & | name, |
const std::string & | help, | ||
double | deflt = 0.0 , |
||
double | min = -DBL_MAX , |
||
double | max = DBL_MAX , |
||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
Definition at line 351 of file Param.cpp.
References BIAS::ParamTypeDouble::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeDouble::max_, BIAS::ParamTypeDouble::min_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeDouble::value_, and BIAS::ParamTypeBase::WriteToFile_.
Referenced by BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().
int * Param::AddParamEnum | ( | const std::string & | name, |
const std::string & | help, | ||
const std::vector< std::string > & | enums, | ||
const int | deflt = 0 , |
||
const std::vector< int > * | IDs = NULL , |
||
const char | cmdshort = 0 , |
||
const int | Group = GRP_NOSHOW |
||
) |
@param enums holds all enumeration names.
IDs | can be a pointer to a vector of integers. It must have the same size as 'enums' and gives each name a number, which must be unique! If NULL the enums are numbered from 0 to enums.size()-1 |
Definition at line 468 of file Param.cpp.
References BIAS::ParamTypeEnum::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeEnum::Map_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeEnum::value_, and BIAS::ParamTypeBase::WriteToFile_.
int * Param::AddParamInt | ( | const std::string & | name, |
const std::string & | help, | ||
int | deflt = 0 , |
||
int | min = std::numeric_limits<int>::min() , |
||
int | max = std::numeric_limits<int>::max() , |
||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
For all adding routines:
name | is the unique identifier of the parameter |
help | is a help or 'tooltip' string for that parameter |
deflt | is a default value for that parameter. Note that not every parameter type has a default at compile time! |
cmdshort | is a short command option for the command line |
Group | is a number to group some parameters for visualization, e.g. all matchers are in group 1, all trackers are in group 37 etc. When printing to screen, you can limit the output to a group of interest. The default is 0 - no special group. |
Definition at line 276 of file Param.cpp.
References BIAS::ParamTypeInt::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeInt::max_, BIAS::ParamTypeInt::min_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeInt::value_, and BIAS::ParamTypeBase::WriteToFile_.
Referenced by BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().
std::string * Param::AddParamString | ( | const std::string & | name, |
const std::string & | help, | ||
std::string | deflt = "" , |
||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
Definition at line 327 of file Param.cpp.
References BIAS::ParamTypeString::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeString::value_, and BIAS::ParamTypeBase::WriteToFile_.
BIAS::Vector< double > * Param::AddParamVecDbl | ( | const std::string & | name, |
const std::string & | help, | ||
const BIAS::Vector< double > & | deflt, | ||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
Add a parameter that expects a string on command line
like "<value0> <value1> <value2> ..."
A vector of double must be given as default vector!
Definition at line 378 of file Param.cpp.
References BIAS::ParamTypeVecDbl::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeVecDbl::value_, and BIAS::ParamTypeBase::WriteToFile_.
Referenced by BIAS::GenSynthMatches::_AddParameter().
BIAS::Vector< double > * Param::AddParamVecDbl | ( | const std::string & | name, |
const std::string & | help, | ||
const std::string & | deflt, | ||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
The same as above, but default is given by a string,
syntax is as at command line "v_0 v_1 v_2", don't set empty string, cause the length is determined also by the number of values
Definition at line 401 of file Param.cpp.
References TNT::Vector< T >::newsize().
BIAS::Vector< int > * Param::AddParamVecInt | ( | const std::string & | name, |
const std::string & | help, | ||
const BIAS::Vector< int > & | deflt, | ||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
Add a parameter that expects a string on command line
like "<value0> <value1> <value2> ..."
A vector of integer must be given a default vector!
Definition at line 423 of file Param.cpp.
References BIAS::ParamTypeVecInt::default_, BIAS::ParamTypeBase::Group_, BIAS::ParamTypeBase::Help_, BIAS::ParamTypeBase::Name_, BIAS::ParamTypeBase::ShortCmd_, BIAS::ParamTypeVecInt::value_, and BIAS::ParamTypeBase::WriteToFile_.
BIAS::Vector< int > * Param::AddParamVecInt | ( | const std::string & | name, |
const std::string & | help, | ||
const std::string & | deflt, | ||
char | cmdshort = 0 , |
||
int | Group = GRP_NOSHOW |
||
) |
The same as other AddParamVecInt(), but default is given by a string,
syntax is as at command line "v_0 v_1 v_2".
Don't set empty string, cause the length is determined also by the number of values
Definition at line 446 of file Param.cpp.
References TNT::Vector< T >::newsize().
bool Param::CheckParam | ( | const std::string & | name | ) |
Check if parameter has already been added.
Definition at line 527 of file Param.cpp.
Referenced by BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().
void Param::ClearAllParams | ( | ) |
|
inlineprotectedinherited |
|
inlineinherited |
Definition at line 341 of file Debug.hh.
Referenced by BIAS::GenSynthMatches::_AddUniformDistributedOutliers(), BIAS::GenSynthMatches::_CreateCamMovement(), BIAS::GenSynthMatches::_CreateStatic2DPoints(), BIAS::UnscentedTransform::ComputeSigmaPoints_(), BIAS::Triangulation::CorrectCorrespondences(), BIAS::GenSynthMatches::GetGTNormalizedF(), BIAS::MonteCarloTransform::GetSamples_(), and BIAS::MonteCarloTransform::Transform().
|
inlineinherited |
|
inline |
Uses this just before end of your program to avoid error from
destructor.
|
inlineinherited |
Definition at line 332 of file Debug.hh.
Referenced by BIAS::listenthread(), BIAS::Image< StorageType >::operator=(), and BIAS::ImageBase::operator=().
|
inlineinherited |
|
inlineinherited |
int Param::GetFreeGroupID | ( | ) |
returns unused group id
Definition at line 1421 of file Param.cpp.
Referenced by BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), BIAS::GenSynthMatchesRig::AddParameters_(), and BIAS::IOUtils::ParseCommandLineEvalHelp().
|
inlinestaticinherited |
int Param::GetGroupID | ( | const std::string & | name | ) |
returns group id of parameter with name
Definition at line 1430 of file Param.cpp.
Referenced by BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().
int Param::GetGroupIDForGroupName | ( | const std::string & | name | ) |
std::string Param::GetGroupName | ( | const int | group_id | ) |
gets the name of a group
Definition at line 1465 of file Param.cpp.
Referenced by BIAS::ParamGUI::GetNotebook().
bool * Param::GetParamBool | ( | const std::string & | name | ) | const |
Definition at line 633 of file Param.cpp.
Referenced by BIAS::GenSynthMatches::_AddParameter().
bool * Param::GetParamBoolByIndex | ( | const int | i | ) | const |
double * Param::GetParamDouble | ( | const std::string & | name | ) | const |
Definition at line 665 of file Param.cpp.
Referenced by BIAS::GenSynthMatches::_AddParameter(), BIAS::GenSynthMatchesRig::AddParameters_(), and BIAS::GenSynthMatchesRig::GetParameters_().
double * Param::GetParamDoubleByIndex | ( | const int | i | ) | const |
int * Param::GetParamEnum | ( | const std::string & | name | ) | const |
int * Param::GetParamInt | ( | const std::string & | name | ) | const |
Definition at line 618 of file Param.cpp.
Referenced by BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), BIAS::GenSynthMatchesRig::AddParameters_(), BIAS::GenSynthMatchesRig::GenSynthMatchesRig(), BIAS::GenSynthMatchesRig::GetParameters_(), BIAS::GenSynthMatchesRig::Setup_(), and BIAS::GenSynthMatchesRig::UpdateParams_().
int * Param::GetParamIntByIndex | ( | const int | i | ) | const |
|
protected |
Definition at line 1885 of file Param.cpp.
Referenced by BIAS::ParamGUI::GetPanel().
|
protected |
std::string * Param::GetParamString | ( | const std::string & | name | ) | const |
std::string * Param::GetParamStringByIndex | ( | const int | i | ) | const |
BIAS::Vector< double > * Param::GetParamVecDbl | ( | const std::string & | name | ) | const |
Definition at line 680 of file Param.cpp.
Referenced by BIAS::GenSynthMatches::_AddParameter(), BIAS::GenSynthMatchesRig::GetParameters_(), and BIAS::GenSynthMatchesRig::UpdateParams_().
BIAS::Vector< int > * Param::GetParamVecInt | ( | const std::string & | name | ) | const |
int Param::GetSizeOfLongestParamName | ( | ) |
int Param::GetSizeOfLongestParamValueString | ( | ) |
bool Param::IsUsedGroupID | ( | const int | group_id | ) |
returns if the group id is used
Definition at line 1496 of file Param.cpp.
Referenced by BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().
|
inlineinherited |
|
inlineinherited |
creates a new debuglevel
Definition at line 474 of file Debug.hh.
Referenced by BIAS::COSAC< SolutionType >::COSAC(), BIAS::ProjectionParametersPerspectiveDepth::Init(), BIAS::MonteCarloTransform::MonteCarloTransform(), BIAS::PMatrixEstimation::PMatrixEstimation(), BIAS::PreemptiveRANSAC< SolutionType >::PreemptiveRANSAC(), BIAS::RANSACPreKnowledge< SolutionType >::RANSACPreKnowledge(), BIAS::ROI::ROI(), BIAS::RotationAveraging::RotationAveraging(), BIAS::SceneOpenSceneGraph::SceneOpenSceneGraph(), BIAS::ThreeDOutOpenSceneGraph::ThreeDOutOpenSceneGraph(), BIAS::Triangulation::Triangulation(), and BIAS::UnscentedTransform::UnscentedTransform().
int Param::ParseCommandLine | ( | int & | argc, |
char * | argv[] | ||
) |
scan command line arguments for valid parameters
argv is reordered according to getopt() all no recognized arguments
are at the end. Return value is optind from getopt(), the index of the next not recognized argument. Sometimes, the function however returns negative values. ?
this delete let the program bail out. but it realy should be deleted
Definition at line 1028 of file Param.cpp.
References option::has_arg, and option::name.
Referenced by BIAS::IOUtils::ParseCommandLineEvalHelp().
|
static |
Extracts lines from passed file.
The specified file is expected to contain a list of entries. Those entries are assumed to be seperated by newlines.
ListFileName | Routine tries to open file with this name. |
LinesInFile | result of line extraction. |
Definition at line 1853 of file Param.cpp.
Referenced by BIAS::IOUtils::LoadImageList(), and BIAS::BVWXMainFrame::LoadImages().
|
inlineinherited |
int Param::ReadParameter | ( | const std::string & | filename | ) |
read values for parameters from file
int Param::ReadParameterXML | ( | const std::string & | filename | ) |
read values for parameters from xml-file
Definition at line 1320 of file Param.cpp.
References BIAS::XMLIO::getAttributeName(), BIAS::XMLIO::getAttributeValueBool(), BIAS::XMLIO::getAttributeValueDouble(), BIAS::XMLIO::getAttributeValueInt(), BIAS::XMLIO::getAttributeValueString(), BIAS::XMLIO::getAttributeValueVecDbl(), BIAS::XMLIO::getAttributeValueVecInt(), BIAS::XMLIO::getFirstAttribute(), BIAS::XMLIO::getFirstChild(), BIAS::XMLIO::getNextAttribute(), BIAS::XMLIO::getNextChild(), and BIAS::XMLIO::read().
int Param::RegisterCallbackObject | ( | const std::string & | name, |
ParamCallbackInterface * | obj | ||
) |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Definition at line 318 of file Debug.hh.
Referenced by BIAS::ShowCamWxVideoSourceFactory::CreateBumbleBee(), BIAS::ShowCamWxVideoSourceFactory::CreateDCAM(), BIAS::VideoSource_MDcam::ScanBus(), BIAS::GLProjectionParametersBase::SetDebugLevel(), BIAS::VideoSource_Disk::VideoSource_Disk(), BIAS::VideoSource_DV2::VideoSource_DV2(), BIAS::VideoSource_DV::VideoSource_DV_Internal_Init_(), and BIAS::VideoSource_V4L::VideoSource_V4L().
|
inlineinherited |
|
inlineinherited |
void Param::SetDefaults | ( | ) |
int Param::SetEnhancedFlag | ( | const std::string & | name, |
bool | enhanced | ||
) |
|
inlinestaticinherited |
int Param::SetGroupName | ( | const int | group_id, |
const std::string & | name | ||
) |
sets the name for a group
Definition at line 1448 of file Param.cpp.
Referenced by BIAS::GenSynthMatches::_AddParameter(), BIAS::GenSynthMatchesRig::AddParameters_(), and BIAS::IOUtils::ParseCommandLineEvalHelp().
int Param::SetHiddenFlag | ( | const std::string & | name, |
bool | hidden | ||
) |
bool * Param::SetParamBool | ( | const std::string & | name, |
const bool & | value | ||
) |
double * Param::SetParamDouble | ( | const std::string & | name, |
const double & | value | ||
) |
int * Param::SetParamEnum | ( | const std::string & | name, |
const int & | value | ||
) |
int * Param::SetParamEnum | ( | const std::string & | name, |
const std::string & | value | ||
) |
int Param::SetParameterWriteToFile | ( | const std::string & | name, |
bool | writeToFile | ||
) |
int * Param::SetParamInt | ( | const std::string & | name, |
const int & | value | ||
) |
std::string * Param::SetParamString | ( | const std::string & | name, |
const std::string & | value | ||
) |
BIAS::Vector< double > * Param::SetParamVecDbl | ( | const std::string & | name, |
const BIAS::Vector< double > & | value | ||
) |
BIAS::Vector< int > * Param::SetParamVecInt | ( | const std::string & | name, |
const BIAS::Vector< int > & | value | ||
) |
|
virtual |
Set [Min,Max] as new range, especially usefull in derived class
PramGUI
Definition at line 1825 of file Param.cpp.
References BIAS::ParamTypeInt::max_, and BIAS::ParamTypeInt::min_.
int Param::SetShortCommand | ( | const std::string & | name, |
const char | cmd | ||
) |
Add a short commandline switch to an existing parameter.
Useful for readconfig/writeconfig.
|
inline |
void Param::ShowData | ( | std::ostream & | os = std::cout , |
int | grp = GRP_ALL , |
||
bool | showenhanced = true |
||
) |
print all data in group grp including current values to os if grp = GRP_ALL, print all values if showenhanced = false, parameters marked as enhanced are not shown
|
inlineinherited |
vector< int > Param::UniqueSortedGroups | ( | ) |
Returns a vector of all group IDs (unique) in ascending order.
Only parameters are with WriteToFile_ = true are considered.
Definition at line 1483 of file Param.cpp.
Referenced by BIAS::ParamGUI::GetNotebook().
int Param::UpdateParameter | ( | int & | argc, |
char * | argv[], | ||
const std::string & | default_filename | ||
) |
update all arguments from command line and parameter file
Command line arguments take precedence over arguments from parameter file. Parameter from parameter file specified with –readconfig=fname take precedencor over parameter read from default_filename. If no parameterfile is found, the defaults are written to default_name.
void Param::Usage | ( | std::ostream & | os = std::cout | ) |
print Help-Information to stdout
Definition at line 176 of file Param.cpp.
Referenced by BIAS::IOUtils::ParseCommandLineEvalHelp().
int Param::WriteParameter | ( | const std::string & | filename | ) |
store complete set of parameter in file if write_comments is set, alo the help strings are written to the file if show_enhanced is set, also parameters marked as enhanced are written
int Param::WriteParameterXML | ( | const std::string & | filename | ) |
Definition at line 1599 of file Param.cpp.
References BIAS::XMLIO::addAttribute(), BIAS::XMLIO::addChildNode(), BIAS::XMLIO::addComment(), BIAS::XMLIO::clear(), BIAS::XMLIO::create(), BIAS::XMLIO::getChild(), option::name, and BIAS::XMLIO::write().
int Param::WriteRunMe | ( | const std::string & | filename | ) |
|
protectedinherited |
Definition at line 510 of file Debug.hh.
Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().
|
protectedinherited |
new concept, debuglevel are managed here in the debug class
Definition at line 516 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
protectedinherited |
Definition at line 517 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
Definition at line 511 of file Debug.hh.
Referenced by BIAS::Debug::operator=().
|
staticprotectedinherited |
|
protected |
Definition at line 548 of file Param.hh.
Referenced by BIAS::ParamGUI::GetNotebook().