comparison Framework/Orthanc/OrthancServer/FromDcmtkBridge.cpp @ 43:9621fd6f17c9

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 17:34:20 +0100
parents 8f68ad57fd18
children 2789d34cb993
comparison
equal deleted inserted replaced
42:ee25d35663ac 43:9621fd6f17c9
38 38
39 #include "FromDcmtkBridge.h" 39 #include "FromDcmtkBridge.h"
40 #include "ToDcmtkBridge.h" 40 #include "ToDcmtkBridge.h"
41 #include "../Core/Logging.h" 41 #include "../Core/Logging.h"
42 #include "../Core/Toolbox.h" 42 #include "../Core/Toolbox.h"
43 #include "../Core/Uuid.h" 43 #include "../Core/TemporaryFile.h"
44 #include "../Core/OrthancException.h" 44 #include "../Core/OrthancException.h"
45 45
46 #include <list> 46 #include <list>
47 #include <limits> 47 #include <limits>
48 48
116 EmbeddedResources::FileResourceId resource) 116 EmbeddedResources::FileResourceId resource)
117 { 117 {
118 std::string content; 118 std::string content;
119 EmbeddedResources::GetFileResource(content, resource); 119 EmbeddedResources::GetFileResource(content, resource);
120 120
121 Toolbox::TemporaryFile tmp; 121 TemporaryFile tmp;
122 tmp.Write(content); 122 tmp.Write(content);
123 123
124 if (!dictionary.loadDictionary(tmp.GetPath().c_str())) 124 if (!dictionary.loadDictionary(tmp.GetPath().c_str()))
125 { 125 {
126 LOG(ERROR) << "Cannot read embedded dictionary. Under Windows, make sure that " 126 LOG(ERROR) << "Cannot read embedded dictionary. Under Windows, make sure that "
142 if (!dictionary.loadDictionary(p.string().c_str())) 142 if (!dictionary.loadDictionary(p.string().c_str()))
143 { 143 {
144 throw OrthancException(ErrorCode_InternalError); 144 throw OrthancException(ErrorCode_InternalError);
145 } 145 }
146 } 146 }
147
148 #endif 147 #endif
149 148
150 149
151 namespace 150 namespace
152 { 151 {