18#ifndef __elxConfiguration_H__
19#define __elxConfiguration_H__
58 typedef itk::SmartPointer< Self >
Pointer;
83 itkGetStringMacro( ParameterFileName );
84 itkSetStringMacro( ParameterFileName );
104 itkSetMacro( ElastixLevel,
unsigned int );
105 itkGetConstMacro( ElastixLevel,
unsigned int );
108 itkSetMacro( TotalNumberOfElastixLevels,
unsigned int );
109 itkGetConstMacro( TotalNumberOfElastixLevels,
unsigned int );
137 const std::string & parameterName )
const
147 const unsigned int entry_nr,
const bool printThisErrorMessage )
149 std::string errorMessage =
"";
151 parameterValue, parameterName, entry_nr,
152 printThisErrorMessage, errorMessage );
153 if( errorMessage !=
"" )
155 xl::xout[
"error" ] << errorMessage;
165 const unsigned int entry_nr )
167 std::string errorMessage =
"";
169 parameterValue, parameterName, entry_nr, errorMessage );
170 if( errorMessage !=
"" )
172 xl::xout[
"error" ] << errorMessage;
182 const std::string & prefix,
183 const unsigned int entry_nr,
const int default_entry_nr,
184 const bool printThisErrorMessage )
const
186 std::string errorMessage =
"";
188 parameterValue, parameterName, prefix, entry_nr, default_entry_nr,
189 printThisErrorMessage, errorMessage );
190 if( errorMessage !=
"" )
192 xl::xout[
"error" ] << errorMessage;
202 const std::string & prefix,
203 const unsigned int entry_nr,
const int default_entry_nr )
const
205 std::string errorMessage =
"";
207 parameterValue, parameterName, prefix, entry_nr, default_entry_nr,
209 if( errorMessage !=
"" )
211 xl::xout[
"error" ] << errorMessage;
221 const std::string & parameterName,
222 const unsigned int entry_nr_start,
223 const unsigned int entry_nr_end,
224 const bool printThisErrorMessage )
const
226 std::string errorMessage =
"";
228 parameterValues, parameterName, entry_nr_start, entry_nr_end,
229 printThisErrorMessage, errorMessage );
230 if( errorMessage !=
"" )
232 xl::xout[
"error" ] << errorMessage;
The BaseComponent class is a class that all elastix components should inherit from.
A class that deals with user given parameters and command line arguments.
void SetCommandLineArgument(const std::string &key, const std::string &value)
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const std::string &prefix, const unsigned int entry_nr, const int default_entry_nr) const
ParameterFileParserType::Pointer ParameterFileParserPointer
itk::SmartPointer< Self > Pointer
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const unsigned int entry_nr)
itk::ParameterFileParser ParameterFileParserType
BaseComponent Superclass2
Configuration(const Self &)
std::string m_ParameterFileName
virtual bool GetPrintErrorMessages(void)
std::vcl_size_t CountNumberOfParameterEntries(const std::string ¶meterName) const
void operator=(const Self &)
virtual int BeforeAllTransformix(void)
unsigned int m_TotalNumberOfElastixLevels
ParameterMapInterfaceType::Pointer ParameterMapInterfacePointer
bool ReadParameter(std::vector< T > ¶meterValues, const std::string ¶meterName, const unsigned int entry_nr_start, const unsigned int entry_nr_end, const bool printThisErrorMessage) const
~Configuration() override
ParameterFileParserPointer m_ParameterFileParser
virtual void PrintParameterFile(void) const
itk::ParameterMapInterface ParameterMapInterfaceType
unsigned int m_ElastixLevel
std::map< std::string, std::string > CommandLineArgumentMapType
virtual bool IsInitialized(void) const
CommandLineArgumentMapType m_CommandLineArgumentMap
virtual int Initialize(const CommandLineArgumentMapType &_arg)
CommandLineArgumentMapType::value_type CommandLineEntryType
virtual int Initialize(const CommandLineArgumentMapType &_arg, const ParameterFileParserType::ParameterMapType &inputMap)
int BeforeAll(void) override
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const unsigned int entry_nr, const bool printThisErrorMessage)
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const std::string &prefix, const unsigned int entry_nr, const int default_entry_nr, const bool printThisErrorMessage) const
itk::SmartPointer< const Self > ConstPointer
ParameterMapInterfacePointer m_ParameterMapInterface
std::string GetCommandLineArgument(const std::string &key) const
Implements functionality to read a parameter file.
std::map< std::string, ParameterValuesType > ParameterMapType
Implements functionality to get parameters from a parameter map.