comparison OrthancStone/Sources/StoneInitialization.cpp @ 1640:52b8b96cb55f

cleaning namespaces
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 10 Nov 2020 16:55:22 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
comparison
equal deleted inserted replaced
1639:5cdc5b98f14d 1640:52b8b96cb55f
101 { 101 {
102 // Run-time checks of locale settings, to be run after Qt has 102 // Run-time checks of locale settings, to be run after Qt has
103 // been initialized, as Qt changes locale settings 103 // been initialized, as Qt changes locale settings
104 104
105 { 105 {
106 OrthancStone::Vector v; 106 Vector v;
107 if (!OrthancStone::LinearAlgebra::ParseVector(v, "1.3671875\\-1.3671875") || 107 if (!LinearAlgebra::ParseVector(v, "1.3671875\\-1.3671875") ||
108 v.size() != 2 || 108 v.size() != 2 ||
109 !OrthancStone::LinearAlgebra::IsNear(1.3671875f, v[0]) || 109 !LinearAlgebra::IsNear(1.3671875f, v[0]) ||
110 !OrthancStone::LinearAlgebra::IsNear(-1.3671875f, v[1])) 110 !LinearAlgebra::IsNear(-1.3671875f, v[1]))
111 { 111 {
112 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, 112 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError,
113 "Error in the locale settings, giving up"); 113 "Error in the locale settings, giving up");
114 } 114 }
115 } 115 }
124 124
125 Orthanc::DicomMap source; 125 Orthanc::DicomMap source;
126 source.FromDicomWeb(dicomweb); 126 source.FromDicomWeb(dicomweb);
127 127
128 std::string s; 128 std::string s;
129 OrthancStone::Vector v; 129 Vector v;
130 if (!source.LookupStringValue(s, Orthanc::DICOM_TAG_PIXEL_SPACING, false) || 130 if (!source.LookupStringValue(s, Orthanc::DICOM_TAG_PIXEL_SPACING, false) ||
131 !OrthancStone::LinearAlgebra::ParseVector(v, s) || 131 !LinearAlgebra::ParseVector(v, s) ||
132 v.size() != 2 || 132 v.size() != 2 ||
133 !OrthancStone::LinearAlgebra::IsNear(1.2f, v[0]) || 133 !LinearAlgebra::IsNear(1.2f, v[0]) ||
134 !OrthancStone::LinearAlgebra::IsNear(-1.5f, v[1])) 134 !LinearAlgebra::IsNear(-1.5f, v[1]))
135 { 135 {
136 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError, 136 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError,
137 "Error in the locale settings, giving up"); 137 "Error in the locale settings, giving up");
138 } 138 }
139 } 139 }