comparison OrthancServer/ServerEnumerations.cpp @ 559:e0cfb413c86b find-move-scp

find scp
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Sep 2013 16:22:21 +0200
parents 1b2cdc855bd3
children f64e3838d6e1
comparison
equal deleted inserted replaced
556:b26a7c397c34 559:e0cfb413c86b
31 31
32 #include "ServerEnumerations.h" 32 #include "ServerEnumerations.h"
33 33
34 #include "../Core/OrthancException.h" 34 #include "../Core/OrthancException.h"
35 #include "../Core/EnumerationDictionary.h" 35 #include "../Core/EnumerationDictionary.h"
36 #include "../Core/Toolbox.h"
36 37
37 #include <boost/thread.hpp> 38 #include <boost/thread.hpp>
38 39
39 namespace Orthanc 40 namespace Orthanc
40 { 41 {
289 throw OrthancException(ErrorCode_ParameterOutOfRange); 290 throw OrthancException(ErrorCode_ParameterOutOfRange);
290 } 291 }
291 } 292 }
292 293
293 294
295 ResourceType StringToResourceType(const char* type)
296 {
297 std::string s(type);
298 Toolbox::ToUpperCase(s);
299
300 if (s == "PATIENT")
301 {
302 return ResourceType_Patient;
303 }
304 else if (s == "STUDY")
305 {
306 return ResourceType_Study;
307 }
308 else if (s == "SERIES")
309 {
310 return ResourceType_Series;
311 }
312 else if (s == "INSTANCE" || s == "IMAGE")
313 {
314 return ResourceType_Instance;
315 }
316 else
317 {
318 throw OrthancException(ErrorCode_ParameterOutOfRange);
319 }
320 }
294 } 321 }