18#ifndef elxConfiguration_h
19#define elxConfiguration_h
82 itkGetStringMacro(ParameterFileName);
83 itkSetStringMacro(ParameterFileName);
105 itkSetMacro(ElastixLevel,
unsigned int);
106 itkGetConstMacro(ElastixLevel,
unsigned int);
109 itkSetMacro(TotalNumberOfElastixLevels,
unsigned int);
110 itkGetConstMacro(TotalNumberOfElastixLevels,
unsigned int);
151 const std::string & parameterName,
152 const unsigned int entry_nr,
153 const bool produceWarningMessage)
const
155 std::string warningMessage =
"";
157 parameterValue, parameterName, entry_nr, produceWarningMessage, warningMessage);
158 if (!warningMessage.empty())
170 ReadParameter(T & parameterValue,
const std::string & parameterName,
const unsigned int entry_nr)
const
172 std::string warningMessage =
"";
174 if (!warningMessage.empty())
187 const std::string & parameterName,
188 const std::string & prefix,
189 const unsigned int entry_nr,
190 const int default_entry_nr,
191 const bool produceWarningMessage)
const
193 std::string warningMessage =
"";
195 parameterValue, parameterName, prefix, entry_nr, default_entry_nr, produceWarningMessage, warningMessage);
196 if (!warningMessage.empty())
209 const std::string & parameterName,
210 const std::string & prefix,
211 const unsigned int entry_nr,
212 const int default_entry_nr)
const
214 std::string warningMessage =
"";
216 parameterValue, parameterName, prefix, entry_nr, default_entry_nr, warningMessage);
217 if (!warningMessage.empty())
235 std::vector<std::string>
247 template <
typename T>
248 std::unique_ptr<std::vector<T>>
256 template <
typename T>
259 const std::string & parameterName,
260 const unsigned int entry_nr,
261 const bool produceWarningMessage)
const
263 auto parameterValue = defaultParameterValue;
265 return parameterValue;
273 const std::string & parameterName,
274 const unsigned int entry_nr,
275 const bool produceWarningMessage)
const
285 const std::string & parameterName,
286 const unsigned int entry_nr_start,
287 const unsigned int entry_nr_end,
288 const bool produceWarningMessage)
const
290 std::string warningMessage =
"";
292 parameterValues, parameterName, entry_nr_start, entry_nr_end, produceWarningMessage, warningMessage);
293 if (!warningMessage.empty())
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)
std::string RetrieveParameterStringValue(const std::string &defaultParameterValue, const std::string ¶meterName, const unsigned int entry_nr, const bool produceWarningMessage) const
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const std::string &prefix, const unsigned int entry_nr, const int default_entry_nr) const
ITK_DISALLOW_COPY_AND_MOVE(Configuration)
std::map< std::string, std::string > CommandLineArgumentMapType
itk::SmartPointer< Self > Pointer
itk::SmartPointer< const Self > ConstPointer
std::vector< std::string > GetValuesOfParameter(const std::string ¶meterName) const
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const unsigned int entry_nr, const bool produceWarningMessage) const
int Initialize(const CommandLineArgumentMapType &_arg)
int Initialize(const CommandLineArgumentMapType &_arg, const itk::ParameterFileParser::ParameterMapType &inputMap)
bool ReadParameter(std::vector< T > ¶meterValues, const std::string ¶meterName, const unsigned int entry_nr_start, const unsigned int entry_nr_end, const bool produceWarningMessage) const
bool GetPrintErrorMessages() const
std::unique_ptr< std::vector< T > > RetrieveValuesOfParameter(const std::string ¶meterName) const
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const unsigned int entry_nr) const
std::string m_ParameterFileName
std::vcl_size_t CountNumberOfParameterEntries(const std::string ¶meterName) const
bool ReadParameter(T ¶meterValue, const std::string ¶meterName, const std::string &prefix, const unsigned int entry_nr, const int default_entry_nr, const bool produceWarningMessage) const
bool HasParameter(const std::string ¶meterName) const
unsigned int m_TotalNumberOfElastixLevels
const itk::ParameterFileParser::Pointer m_ParameterFileParser
T RetrieveParameterValue(const T &defaultParameterValue, const std::string ¶meterName, const unsigned int entry_nr, const bool produceWarningMessage) const
bool IsInitialized() const
int BeforeAllTransformix()
unsigned int m_ElastixLevel
void PrintParameterFile() const
CommandLineArgumentMapType m_CommandLineArgumentMap
CommandLineArgumentMapType::value_type CommandLineEntryType
~Configuration() override=default
const itk::ParameterMapInterface::Pointer m_ParameterMapInterface
std::string GetCommandLineArgument(const std::string &key) const
std::map< std::string, ParameterValuesType > ParameterMapType