12 #ifndef mitkTestDICOMLoading_h
13 #define mitkTestDICOMLoading_h
45 DumpImageInformation(
const Image* image );
53 CompareImageInformationDumps(
const std::string& reference,
54 const std::string& test );
58 typedef std::map<std::string,std::string> KeyValueMap;
60 DICOMFileReader::Pointer
63 void SetDefaultLocale();
65 void ResetUserLocale();
67 std::string ComponentTypeToString( itk::IOComponentEnum type );
69 KeyValueMap ParseDump(
const std::string& dump );
71 bool CompareSpacedValueFields(
const std::string& reference,
72 const std::string& test,
75 bool CompareJSON(
const std::string& reference,
76 const std::string& test );
84 std::string reduce(
const std::string& pString,
85 const std::string& pFill =
" ",
86 const std::string& pWhitespace =
" \t");
93 std::string trim(
const std::string& pString,
94 const std::string& pWhitespace =
" \t");
97 bool StringToNumber(
const std::string& s, T& value)
99 std::stringstream stream(s);
101 return (!stream.fail()) && (std::abs(value) <= std::numeric_limits<T>::max());
106 const char* m_PreviousCLocale;
107 std::locale m_PreviousCppLocale;