#include <elxConversion.h>
A class that contains utility functions for the conversion of number of seconds and parameter values to text.
Definition at line 44 of file elxConversion.h.
Public Types | |
using | ParameterMapType = std::map<std::string, ParameterValuesType> |
using | ParameterValuesType = std::vector<std::string> |
using | Self = Conversion |
Static Public Member Functions | |
static constexpr const char * | BoolToString (const bool arg) |
template<typename TValue > | |
static std::vector< TValue > | ConcatenateVectors (std::vector< TValue > vector1, std::vector< TValue > vector2) |
static bool | IsNumber (const std::string &) |
static std::string | ObjectPtrToString (itk::Object *) |
static std::string | ParameterMapToString (const ParameterMapType &) |
static std::string | SecondsToDHMS (const double totalSeconds, const unsigned int precision) |
static bool | StringToValue (const std::string &str, bool &value) |
static bool | StringToValue (const std::string &str, itk::Object *&value) |
static bool | StringToValue (const std::string &str, std::string &value) |
template<class T > | |
static bool | StringToValue (const std::string &str, T &value) |
static std::string | ToNativePathNameSeparators (const std::string &) |
static itk::OptimizerParameters< double > | ToOptimizerParameters (const std::vector< double > &) |
static std::string | ToString (const bool arg) |
template<typename TInteger > | |
static std::string | ToString (const TInteger integerValue) |
static std::string | ToString (double) |
static std::string | ToString (float) |
template<typename T , unsigned int NRows, unsigned int NColumns> | |
static std::vector< std::string > | ToVectorOfStrings (const itk::Matrix< T, NRows, NColumns > &matrix) |
template<typename TContainer , typename SFINAE = typename TContainer::iterator> | |
static std::vector< std::string > | ToVectorOfStrings (const TContainer &container) |
static bool | StringToValue (const std::string &str, double &value) |
static bool | StringToValue (const std::string &str, float &value) |
static bool | StringToValue (const std::string &str, char &value) |
static bool | StringToValue (const std::string &str, signed char &value) |
static bool | StringToValue (const std::string &str, unsigned char &value) |
using elastix::Conversion::ParameterMapType = std::map<std::string, ParameterValuesType> |
Definition at line 49 of file elxConversion.h.
using elastix::Conversion::ParameterValuesType = std::vector<std::string> |
Corresponds with typedefs from the elastix class itk::ParameterFileParser.
Definition at line 48 of file elxConversion.h.
using elastix::Conversion::Self = Conversion |
Definition at line 50 of file elxConversion.h.
|
inlinestaticconstexpr |
Convenience function to convert a boolean to a text string.
Definition at line 58 of file elxConversion.h.
|
inlinestatic |
Convenience function to concatenate two vectors.
Definition at line 148 of file elxConversion.h.
|
static |
Convenience function which tells whether the argument may represent a number (either fixed point, floating point, or integer/whole number).
|
static |
Converts a raw itk::Object pointer to a text string.
|
static |
Converts the specified parameter map to a text string, according to the elastix parameter text file format.
|
static |
Convenience function to convert seconds to day, hour, minute, second format.
Overload to cast a string to a bool. Returns true when casting was successful and false otherwise.
|
static |
Overloads for (signed/unsigned) char types, processing them as 8-bits integer types.
Overloads for floating point types, to support NaN and infinity.
Overloads for floating point types, to support NaN and infinity.
|
static |
Overload to cast a string to an itk::Object pointer. Returns true when casting was successful and false otherwise.
|
static |
Overloads for (signed/unsigned) char types, processing them as 8-bits integer types.
|
static |
Provide a specialization for std::string, since the general StringToValue (especially outputStringStream >> value) will not work for strings containing spaces.
|
inlinestatic |
A templated function to cast strings to a type T. Returns true when casting was successful and false otherwise. We make use of the casting functionality of string streams.
Definition at line 174 of file elxConversion.h.
|
static |
Overloads for (signed/unsigned) char types, processing them as 8-bits integer types.
|
static |
Similar to Qt5 QDir::toNativeSeparators(const QString &pathName)
.
|
static |
Converts the specified std::vector
to an OptimizerParameters object.
|
inlinestatic |
Convenience function overload to convert a Boolean to a text string.
Definition at line 77 of file elxConversion.h.
|
inlinestatic |
Convenience function overload to convert an integer to a text string.
Definition at line 93 of file elxConversion.h.
|
static |
Convenience function overload to convert a double precision floating point to a text string.
|
static |
Convenience function overload to convert a single precision floating point to a text string.
|
inlinestatic |
Convenience function overload to convert a 2-D matrix to a vector of text strings. Typically used for an itk::ImageBase::DirectionType.
Definition at line 129 of file elxConversion.h.
|
inlinestatic |
Convenience function overload to convert a container to a vector of text strings. The container may be an itk::Size, itk::Index, itk::Point<double,N>, or itk::Vector<double,N>, or itk::OptimizationParameters<double>.
The C++ SFINAE idiom is being used to ensure that the argument type supports standard C++ iteration.
Definition at line 111 of file elxConversion.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |