Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::ParamGUI Class Reference

The main Parameter Gui interface, derived from BIAS::Param and extends this class. More...

#include <Gui/ParamGUI.hh>

+ Inheritance diagram for BIAS::ParamGUI:
+ Collaboration diagram for BIAS::ParamGUI:

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> ..."
A vector of double must be given as default vector! More...

 
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> ..."
A vector of integer must be given a default vector! More...

 
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
 
ParamGUIDialogGetDialog (wxWindow *parent, const wxString &title, bool bChancelButton=true)
 Builds up a wxDialog with a notebook embedded in it. More...
 
wxFrame * GetFrame (wxWindow *parent)
 Builds up a standalone wxFrame with a notebook embedded in it. More...
 
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...
 
wxNotebook * GetNotebook (wxWindow *parent)
 Builds up a wxNotebook with each parameter group on one page. More...
 
wxPanel * GetPanel (wxWindow *parent, int GroupID=GRP_ALL)
 Builds up a wxPanel with the parameters specified by GroupID. 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...
 
 ParamGUI ()
 
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...

 
 ~ParamGUI ()
 

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 optionlongopts
 
bool WriteComments_
 
bool WriteEnhanced_
 
bool WriteFlagSet_
 
bool WriteIndent_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

The main Parameter Gui interface, derived from BIAS::Param and extends this class.

Provides a wxPanel, a wxFrame, a dialog or a notebook with the parameters sorted by their groups

Author
evers/mdunda
Examples:
ParamGUISample1.cpp, ParamGUISample2.cpp, and ParamGUISample3.cpp.

Definition at line 88 of file ParamGUI.hh.

Constructor & Destructor Documentation

ParamGUI::ParamGUI ( )

Definition at line 23 of file ParamGUI.cpp.

ParamGUI::~ParamGUI ( )

Definition at line 29 of file ParamGUI.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

bool * Param::AddParamBool ( const std::string &  name,
const std::string &  help,
bool  deflt = false,
char  cmdshort = 0,
int  Group = GRP_NOSHOW 
)
inherited
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 
)
inherited
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 
)
inherited
@param enums holds all enumeration names.
Parameters
IDscan 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
Author
mdunda 03 2004
Examples:
ExampleAbsoluteOrientation.cpp, ExampleCylinderMapping.cpp, ExampleParam.cpp, and ExampleRectification.cpp.

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 
)
inherited

For all adding routines:

Parameters
nameis the unique identifier of the parameter
helpis a help or 'tooltip' string for that parameter
defltis a default value for that parameter. Note that not every parameter type has a default at compile time!
cmdshortis a short command option for the command line
Groupis 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.
Author
mdunda 03 2004
Examples:
ExampleAbsoluteOrientation.cpp, ExampleAutoCalib.cpp, ExampleBlobDetectorLevelSet.cpp, ExampleCannyEdge.cpp, ExampleColorNCC.cpp, ExampleMDCamToShm.cpp, ExampleMultisampleBlit.cpp, ExampleParam.cpp, ExamplePlainPerPixelProcessing.cpp, ExampleProjectionMapping.cpp, ExamplePyramidImage.cpp, ParamGUISample1.cpp, ParamGUISample2.cpp, ParamGUISample3.cpp, and ProjectionError.cpp.

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 
)
inherited
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 
)
inherited

Add a parameter that expects a string on command line

like "<value0> <value1> <value2> ..."
A vector of double must be given as default vector!

Examples:
ExampleCameraPath2Vrml.cpp, ExampleColorNCC.cpp, ExampleParam.cpp, and ExampleProjectionMapping.cpp.

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 
)
inherited

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

Author
Daniel Grest, July 2005

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 
)
inherited

 Add a parameter that expects a string on command line

like "<value0> <value1> <value2> ..."
A vector of integer must be given a default vector!

Examples:
ExampleBlobDetectorLevelSet.cpp, and ExampleParam.cpp.

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 
)
inherited

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

Author
Daniel Grest, July 2005

Definition at line 446 of file Param.cpp.

References TNT::Vector< T >::newsize().

bool Param::CheckParam ( const std::string &  name)
inherited

Check if parameter has already been added.

Examples:
ExampleColorNCC.cpp.

Definition at line 527 of file Param.cpp.

Referenced by BIAS::MatchDataBase::_AddParameter(), BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().

void Param::ClearAllParams ( )
inherited

empties internal datastructures

Definition at line 1899 of file Param.cpp.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

void BIAS::Param::DisableDestructorWarning ( )
inlineinherited

Uses this just before end of your program to avoid error from

destructor.

Author
evers
Examples:
ExampleColorNCC.cpp, ExampleCylinderMapping.cpp, ExampleGenSynthMatches.cpp, ExampleGenSynthMatchesRig.cpp, ExampleMDCamToShm.cpp, ExamplePyramidImage.cpp, and ExampleTrackerBase.cpp.

Definition at line 513 of file Param.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

ParamGUIDialog * ParamGUI::GetDialog ( wxWindow parent,
const wxString &  title,
bool  bChancelButton = true 
)

Builds up a wxDialog with a notebook embedded in it.

Returns
a pointer to the new dialog NULL on error
Author
evers 2004-01

Definition at line 137 of file ParamGUI.cpp.

wxFrame * ParamGUI::GetFrame ( wxWindow parent)

Builds up a standalone wxFrame with a notebook embedded in it.

Returns
a pointer to the new frame NULL on error
Author
mdunda 03 2004
Examples:
ParamGUISample2.cpp.

Definition at line 118 of file ParamGUI.cpp.

References GetNotebook().

int Param::GetFreeGroupID ( )
inherited
static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

int Param::GetGroupID ( const std::string &  name)
inherited

returns group id of parameter with name

Author
woelk

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)
inherited
Author
evers

Definition at line 1440 of file Param.cpp.

std::string Param::GetGroupName ( const int  group_id)
inherited

gets the name of a group

Author
woelk

Definition at line 1465 of file Param.cpp.

Referenced by GetNotebook().

wxNotebook * ParamGUI::GetNotebook ( wxWindow parent)

Builds up a wxNotebook with each parameter group on one page.

Group-ID -1 (GRP_NOSHOW) will be ignored.

Returns
a pointer to the new notebook NULL on error
Author
mdunda 03 2004 now GroupNames are shown in tabs if all Groupnames are set ischiller 08.09.04

Definition at line 83 of file ParamGUI.cpp.

References BIAS::AsciiToWx(), BIAS::Param::GetGroupName(), GetPanel(), BIAS::Param::GroupNames_, and BIAS::Param::UniqueSortedGroups().

Referenced by GetFrame(), and BIAS::ParamGUIDialog::ParamGUIDialog().

wxPanel * ParamGUI::GetPanel ( wxWindow parent,
int  GroupID = GRP_ALL 
)
bool * Param::GetParamBool ( const std::string &  name) const
inherited
bool * Param::GetParamBoolByIndex ( const int  i) const
inherited

Get a Param-value by Index.

Running-time is O(n). Grouping and other features are unsupported by this function.

Author
Stefan Goerrissen, 09/2008

Definition at line 576 of file Param.cpp.

double * Param::GetParamDouble ( const std::string &  name) const
inherited
double * Param::GetParamDoubleByIndex ( const int  i) const
inherited

Get a Param-value by Index.

Running-time is O(n). Grouping and other features are unsupported by this function.

Author
Stefan Goerrissen, 09/2008

Definition at line 555 of file Param.cpp.

int * Param::GetParamEnum ( const std::string &  name) const
inherited
Examples:
ExampleCylinderMapping.cpp.

Definition at line 712 of file Param.cpp.

int * Param::GetParamInt ( const std::string &  name) const
inherited
int * Param::GetParamIntByIndex ( const int  i) const
inherited

Get a Param-value by Index.

Running-time is O(n). Grouping and other features are unsupported by this function.

Author
Stefan Goerrissen, 09/2008

Definition at line 534 of file Param.cpp.

std::map< const std::string, BIAS::ParamTypeBase * > & Param::GetParamMap ( )
protectedinherited

Definition at line 1885 of file Param.cpp.

Referenced by GetPanel().

const std::map< const std::string, BIAS::ParamTypeBase * > & Param::GetParamMap ( ) const
protectedinherited

Definition at line 1891 of file Param.cpp.

std::string * Param::GetParamString ( const std::string &  name) const
inherited
std::string * Param::GetParamStringByIndex ( const int  i) const
inherited

Get a Param-value by Index.

Running-time is O(n). Grouping and other features are unsupported by this function.

Author
Stefan Goerrissen, 09/2008

Definition at line 597 of file Param.cpp.

BIAS::Vector< double > * Param::GetParamVecDbl ( const std::string &  name) const
inherited
BIAS::Vector< int > * Param::GetParamVecInt ( const std::string &  name) const
inherited
Examples:
ExampleBlobDetectorLevelSet.cpp.

Definition at line 696 of file Param.cpp.

int Param::GetSizeOfLongestParamName ( )
inherited

returns the size of the longest param name not marked as enhanced or hidden

Author
woelk 10/2004

Definition at line 1502 of file Param.cpp.

int Param::GetSizeOfLongestParamValueString ( )
inherited

returns the size of the longest param value string not marked as enhanced or hidden

Author
woelk 10/2004

Definition at line 1516 of file Param.cpp.

bool BIAS::Param::GetWriteFlag ( )
inlineinherited

Definition at line 383 of file Param.hh.

bool Param::IsUsedGroupID ( const int  group_id)
inherited

returns if the group id is used

Author
woelk

Definition at line 1496 of file Param.cpp.

Referenced by BIAS::GenSynthMatches::_AddParameter(), and BIAS::GenSynthMatchesRig::AddParameters_().

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
int Param::ParseCommandLine ( int &  argc,
char *  argv[] 
)
inherited

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. ?

Todo:
document concept of return value of ParseCommandLine Reads parameter from file if argument –readconfig is given.
Author
evers

this delete let the program bail out. but it realy should be deleted

Examples:
ExampleAbsoluteOrientation.cpp, ExampleBlobDetectorLevelSet.cpp, ExampleCalcRelativeTransform.cpp, ExampleCameraPath2Vrml.cpp, ExampleColorNCC.cpp, ExampleCylinderMapping.cpp, ExampleGenSynthMatches.cpp, ExampleGenSynthMatchesRig.cpp, ExampleLogPolarMapping.cpp, ExampleMDCamToShm.cpp, ExampleParam.cpp, ExampleProjectionMapping.cpp, ExamplePyramidImage.cpp, ExampleRectification.cpp, ExampleTFT.cpp, ExampleVideoServer.cpp, ParamGUISample2.cpp, and ProjectionError.cpp.

Definition at line 1028 of file Param.cpp.

References option::has_arg, and option::name.

Referenced by BIAS::IOUtils::ParseCommandLineEvalHelp().

int Param::ParseListFile ( const std::string &  ListFileName,
std::vector< std::string > &  LinesInFile 
)
staticinherited

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.

Parameters
ListFileNameRoutine tries to open file with this name.
LinesInFileresult of line extraction.
Returns
-1 if file could not be opened.
0 all good.
Examples:
ExampleMixtureOfGaussians.cpp.

Definition at line 1853 of file Param.cpp.

Referenced by BIAS::IOUtils::LoadImageList(), and BIAS::BVWXMainFrame::LoadImages().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

int Param::ReadParameter ( const std::string &  filename)
inherited

read values for parameters from file

Examples:
ExampleAutoCalib.cpp, ExampleGenSynthMatches.cpp, ExampleGenSynthMatchesRig.cpp, and ExampleTFT.cpp.

Definition at line 1219 of file Param.cpp.

int Param::ReadParameterXML ( const std::string &  filename)
inherited
int Param::RegisterCallbackObject ( const std::string &  name,
ParamCallbackInterface obj 
)
inherited
Author
evers
Examples:
ParamGUISample1.cpp, and ParamGUISample3.cpp.

Definition at line 1813 of file Param.cpp.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

void Param::SetDefaults ( )
inherited

sets all entries to their initially (AddParam) given default values

Definition at line 1806 of file Param.cpp.

int Param::SetEnhancedFlag ( const std::string &  name,
bool  enhanced 
)
inherited

if a parametr is marked as enhanced, it is hidden from the naive user

Definition at line 957 of file Param.cpp.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

int Param::SetGroupName ( const int  group_id,
const std::string &  name 
)
inherited
int Param::SetHiddenFlag ( const std::string &  name,
bool  hidden 
)
inherited

if a parametr is marked as hidden, it is obsolete and hidden for all users, use this for parameters overwritten by caller class

Definition at line 970 of file Param.cpp.

bool * Param::SetParamBool ( const std::string &  name,
const bool &  value 
)
inherited

Definition at line 757 of file Param.cpp.

double * Param::SetParamDouble ( const std::string &  name,
const double &  value 
)
inherited

Definition at line 802 of file Param.cpp.

int * Param::SetParamEnum ( const std::string &  name,
const int &  value 
)
inherited

set the enum to the ID 'value'

Definition at line 917 of file Param.cpp.

int * Param::SetParamEnum ( const std::string &  name,
const std::string &  value 
)
inherited

set the enum to the ID corresponding to the string 'value'

Definition at line 890 of file Param.cpp.

int Param::SetParameterWriteToFile ( const std::string &  name,
bool  writeToFile 
)
inherited

Definition at line 944 of file Param.cpp.

int * Param::SetParamInt ( const std::string &  name,
const int &  value 
)
inherited

Definition at line 729 of file Param.cpp.

std::string * Param::SetParamString ( const std::string &  name,
const std::string &  value 
)
inherited

Definition at line 779 of file Param.cpp.

BIAS::Vector< double > * Param::SetParamVecDbl ( const std::string &  name,
const BIAS::Vector< double > &  value 
)
inherited

Definition at line 830 of file Param.cpp.

BIAS::Vector< int > * Param::SetParamVecInt ( const std::string &  name,
const BIAS::Vector< int > &  value 
)
inherited

Definition at line 860 of file Param.cpp.

int Param::SetRangeInt ( const std::string &  name,
const int  min,
const int  max 
)
virtualinherited

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 
)
inherited

Add a short commandline switch to an existing parameter.

Useful for readconfig/writeconfig.

Author
evers
Examples:
ExampleVideoServer.cpp.

Definition at line 1841 of file Param.cpp.

void BIAS::Param::SetWriteOptions ( bool  indent,
bool  comments,
bool  enhanced 
)
inlineinherited
void Param::ShowData ( std::ostream &  os = std::cout,
int  grp = GRP_ALL,
bool  showenhanced = true 
)
inherited

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

Examples:
ExampleAutoCalib.cpp, and ExampleParam.cpp.

Definition at line 121 of file Param.cpp.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

vector< int > Param::UniqueSortedGroups ( )
inherited

Returns a vector of all group IDs (unique) in ascending order.

Only parameters are with WriteToFile_ = true are considered.

Author
woelk 03 2004

Definition at line 1483 of file Param.cpp.

Referenced by GetNotebook().

int Param::UpdateParameter ( int &  argc,
char *  argv[],
const std::string &  default_filename 
)
inherited

update all arguments from command line and parameter file

  1. reads parameter from default file
  2. if –readconfig is given on commandline, reads parameter from this file
  3. evaluates parameter given on command line

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.

Author
woelk 09/2004
Examples:
ExampleTrackerBase.cpp.

Definition at line 985 of file Param.cpp.

void Param::Usage ( std::ostream &  os = std::cout)
inherited
int Param::WriteParameter ( const std::string &  filename)
inherited

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

Author
??
Examples:
ExampleAutoCalib.cpp, ExampleGenSynthMatches.cpp, ExampleGenSynthMatchesRig.cpp, and ExampleTFT.cpp.

Definition at line 1531 of file Param.cpp.

int Param::WriteParameterXML ( const std::string &  filename)
inherited
int Param::WriteRunMe ( const std::string &  filename)
inherited

writes complete command line including program name and

unknown command line options, no defaults, no params read from file

Definition at line 1773 of file Param.cpp.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::vector<std::string> BIAS::Param::ArgV_
protectedinherited

Definition at line 547 of file Param.hh.

bool BIAS::Param::DestructorWarning_
protectedinherited

Definition at line 550 of file Param.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

std::vector<std::string> BIAS::Param::GroupNames_
protectedinherited

Definition at line 548 of file Param.hh.

Referenced by GetNotebook().

struct option* BIAS::Param::longopts
protectedinherited

Definition at line 549 of file Param.hh.

bool BIAS::Param::WriteComments_
protectedinherited

Definition at line 553 of file Param.hh.

bool BIAS::Param::WriteEnhanced_
protectedinherited

Definition at line 554 of file Param.hh.

bool BIAS::Param::WriteFlagSet_
protectedinherited

Definition at line 555 of file Param.hh.

bool BIAS::Param::WriteIndent_
protectedinherited

Definition at line 552 of file Param.hh.


The documentation for this class was generated from the following files: