go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
elastix::Configuration Class Reference

A class that deals with user given parameters and command line arguments. More...

#include <elxConfiguration.h>

Inheritance diagram for elastix::Configuration:
Inheritance graph
[legend]
Collaboration diagram for elastix::Configuration:
Collaboration graph
[legend]

Public Types

typedef std::map< std::string,
std::string > 
CommandLineArgumentMapType
typedef
CommandLineArgumentMapType::value_type 
CommandLineEntryType
typedef itk::SmartPointer
< const Self
ConstPointer
typedef
ParameterFileParserType::Pointer 
ParameterFileParserPointer
typedef itk::ParameterFileParser ParameterFileParserType
typedef
ParameterMapInterfaceType::Pointer 
ParameterMapInterfacePointer
typedef itk::ParameterMapInterface ParameterMapInterfaceType
typedef itk::SmartPointer< SelfPointer
typedef Configuration Self
typedef itk::Object Superclass1
typedef BaseComponent Superclass2

Public Member Functions

virtual int BeforeAll (void)
virtual int BeforeAllTransformix (void)
std::vcl_size_t CountNumberOfParameterEntries (const std::string &parameterName) const
virtual const char * GetClassName () const
const std::string GetCommandLineArgument (const std::string &key) const
virtual unsigned int GetElastixLevel () const
virtual const char * GetParameterFileName () const
virtual bool GetPrintErrorMessages (void)
virtual unsigned int GetTotalNumberOfElastixLevels () const
virtual int Initialize (const CommandLineArgumentMapType &_arg)
virtual bool IsInitialized (void) const
template<class T >
bool ReadParameter (T &parameterValue, const std::string &parameterName, const std::string &prefix, const unsigned int entry_nr, const int default_entry_nr, const bool printThisErrorMessage) const
template<class T >
bool ReadParameter (T &parameterValue, const std::string &parameterName, const unsigned int entry_nr, const bool printThisErrorMessage)
template<class T >
bool ReadParameter (T &parameterValue, const std::string &parameterName, const unsigned int entry_nr)
template<class T >
bool ReadParameter (std::vector< T > &parameterValues, const std::string &parameterName, const unsigned int entry_nr_start, const unsigned int entry_nr_end, const bool printThisErrorMessage) const
template<class T >
bool ReadParameter (T &parameterValue, const std::string &parameterName, const std::string &prefix, const unsigned int entry_nr, const int default_entry_nr) const
void SetCommandLineArgument (const std::string &key, const std::string &value)
virtual void SetElastixLevel (unsigned int _arg)
virtual void SetParameterFileName (const char *_arg)
virtual void SetTotalNumberOfElastixLevels (unsigned int _arg)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 Configuration ()
virtual void PrintParameterFile (void) const
virtual ~Configuration ()

Private Member Functions

 Configuration (const Self &)
void operator= (const Self &)

Private Attributes

CommandLineArgumentMapType m_CommandLineArgumentMap
unsigned int m_ElastixLevel
bool m_IsInitialized
std::string m_ParameterFileName
ParameterFileParserPointer m_ParameterFileParser
ParameterMapInterfacePointer m_ParameterMapInterface
unsigned int m_TotalNumberOfElastixLevels

Detailed Description

A class that deals with user given parameters and command line arguments.

The Configuration class provides the functions ReadParameter() (to read parameters from the parameter file) and ReadCommandLineArgument(), and provides an easy way to get the current elastix level.

Parameters:
PrintErrorMessages: defines if warnings and errors should be printed to screen, e.g. when a parameter cannot be found and the default is used. example: (PrintErrorMessages "false")
Default: "true"

Definition at line 48 of file elxConfiguration.h.


Member Typedef Documentation

typedef std::map<std::string, std::string> elastix::Configuration::CommandLineArgumentMapType

Typedefs for the command line arguments.

Definition at line 63 of file elxConfiguration.h.

typedef CommandLineArgumentMapType::value_type elastix::Configuration::CommandLineEntryType

Definition at line 67 of file elxConfiguration.h.

typedef itk::SmartPointer<const Self> elastix::Configuration::ConstPointer

Definition at line 57 of file elxConfiguration.h.

Definition at line 71 of file elxConfiguration.h.

Typedefs for the parameter file.

Definition at line 70 of file elxConfiguration.h.

Definition at line 73 of file elxConfiguration.h.

Definition at line 72 of file elxConfiguration.h.

typedef itk::SmartPointer<Self> elastix::Configuration::Pointer

Definition at line 56 of file elxConfiguration.h.

Standard itk.

Definition at line 53 of file elxConfiguration.h.

Definition at line 54 of file elxConfiguration.h.

Definition at line 55 of file elxConfiguration.h.


Constructor & Destructor Documentation

elastix::Configuration::Configuration ( ) [protected]
virtual elastix::Configuration::~Configuration ( ) [inline, protected, virtual]

Definition at line 230 of file elxConfiguration.h.

elastix::Configuration::Configuration ( const Self ) [private]

Member Function Documentation

virtual int elastix::Configuration::BeforeAll ( void  ) [virtual]

Set/Get whether warnings are allowed to be printed, when reading a parameter. * itkSetMacro( Silent, bool ); itkGetConstMacro( Silent, bool ); Methods that is called at the very beginning of elastixTemplate::Run.

  • Prints the parameter file

Reimplemented from elastix::BaseComponent.

virtual int elastix::Configuration::BeforeAllTransformix ( void  ) [virtual]

Methods that is called at the very beginning of elastixTemplate::ApplyTransform.

  • Prints the parameter file
std::vcl_size_t elastix::Configuration::CountNumberOfParameterEntries ( const std::string &  parameterName) const [inline]

Interface to the ParameterMapInterface. Count the number of parameters.

Definition at line 130 of file elxConfiguration.h.

virtual const char* elastix::Configuration::GetClassName ( ) const [virtual]

Standard part of all itk objects.

const std::string elastix::Configuration::GetCommandLineArgument ( const std::string &  key) const

Get and Set CommandLine arguments into the argument map.

virtual unsigned int elastix::Configuration::GetElastixLevel ( ) const [virtual]
virtual const char* elastix::Configuration::GetParameterFileName ( ) const [virtual]

Get/Set the name of the parameterFileName.

virtual bool elastix::Configuration::GetPrintErrorMessages ( void  ) [inline, virtual]

Definition at line 106 of file elxConfiguration.h.

virtual unsigned int elastix::Configuration::GetTotalNumberOfElastixLevels ( ) const [virtual]
virtual int elastix::Configuration::Initialize ( const CommandLineArgumentMapType _arg) [virtual]

Pass the command line arguments as a map. One of the command line arguments should be either: -p <parameter_file> or -tp <transform_parameter_file>. The specified (transform) parameter file is read by the itk::ParameterFileParser and passed to the itk::ParameterMapInterface.

virtual bool elastix::Configuration::IsInitialized ( void  ) const [virtual]

True, if Initialize was successfully called.

static Pointer elastix::Configuration::New ( ) [static]

Method for creation through the object factory.

void elastix::Configuration::operator= ( const Self ) [private]
virtual void elastix::Configuration::PrintParameterFile ( void  ) const [protected, virtual]

Print the parameter file to the log file. Called by BeforeAll(). This function is not really generic. It's just added because it needs to be called by both BeforeAll and BeforeAllTransformix.

template<class T >
bool elastix::Configuration::ReadParameter ( T &  parameterValue,
const std::string &  parameterName,
const unsigned int  entry_nr,
const bool  printThisErrorMessage 
) [inline]

Read a parameter from the parameter file.

Definition at line 139 of file elxConfiguration.h.

template<class T >
bool elastix::Configuration::ReadParameter ( T &  parameterValue,
const std::string &  parameterName,
const unsigned int  entry_nr 
) [inline]

Read a parameter from the parameter file.

Definition at line 156 of file elxConfiguration.h.

template<class T >
bool elastix::Configuration::ReadParameter ( T &  parameterValue,
const std::string &  parameterName,
const std::string &  prefix,
const unsigned int  entry_nr,
const int  default_entry_nr,
const bool  printThisErrorMessage 
) const [inline]

Read a parameter from the parameter file.

Definition at line 172 of file elxConfiguration.h.

template<class T >
bool elastix::Configuration::ReadParameter ( std::vector< T > &  parameterValues,
const std::string &  parameterName,
const unsigned int  entry_nr_start,
const unsigned int  entry_nr_end,
const bool  printThisErrorMessage 
) const [inline]

Read a range of parameters from the parameter file.

Definition at line 209 of file elxConfiguration.h.

template<class T >
bool elastix::Configuration::ReadParameter ( T &  parameterValue,
const std::string &  parameterName,
const std::string &  prefix,
const unsigned int  entry_nr,
const int  default_entry_nr 
) const [inline]

Read a parameter from the parameter file.

Definition at line 191 of file elxConfiguration.h.

void elastix::Configuration::SetCommandLineArgument ( const std::string &  key,
const std::string &  value 
)
virtual void elastix::Configuration::SetElastixLevel ( unsigned int  _arg) [virtual]

Other elastix related information. Get and Set the elastix level.

virtual void elastix::Configuration::SetParameterFileName ( const char *  _arg) [virtual]
virtual void elastix::Configuration::SetTotalNumberOfElastixLevels ( unsigned int  _arg) [virtual]

Get and Set the total number of elastix levels.


Field Documentation

Definition at line 243 of file elxConfiguration.h.

Definition at line 249 of file elxConfiguration.h.

Definition at line 248 of file elxConfiguration.h.

Definition at line 244 of file elxConfiguration.h.

Definition at line 245 of file elxConfiguration.h.

Definition at line 246 of file elxConfiguration.h.

Definition at line 250 of file elxConfiguration.h.



Generated on 24-10-2011 for elastix by doxygen 1.7.4 elastix logo