Mercurial > hg > orthanc
comparison OrthancServer/DicomProtocol/DicomServer.cpp @ 357:8d3a0db39967
fix of standalone builds
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 31 Jan 2013 14:06:34 +0100 |
parents | 6c4f6229aad7 |
children | 2cef9c2d4148 |
comparison
equal
deleted
inserted
replaced
356:d1f82cf3ae35 | 357:8d3a0db39967 |
---|---|
78 | 78 |
79 #if DCMTK_USE_EMBEDDED_DICTIONARIES == 1 | 79 #if DCMTK_USE_EMBEDDED_DICTIONARIES == 1 |
80 LOG(WARNING) << "Loading the embedded dictionaries"; | 80 LOG(WARNING) << "Loading the embedded dictionaries"; |
81 dcmDataDict.clear(); | 81 dcmDataDict.clear(); |
82 DcmDataDictionary& d = dcmDataDict.wrlock(); | 82 DcmDataDictionary& d = dcmDataDict.wrlock(); |
83 | |
84 /** | |
85 * Do not load DICONDE dictionary, it breaks the other tags. The | |
86 * command "strace storescu 2>&1 |grep dic" shows that DICONDE | |
87 * dictionary is not loaded by storescu. | |
88 **/ | |
89 //LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_DICONDE); | |
90 | |
83 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_DICOM); | 91 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_DICOM); |
84 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_PRIVATE); | 92 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_PRIVATE); |
85 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_DICONDE); | |
86 dcmDataDict.unlock(); | 93 dcmDataDict.unlock(); |
87 #endif | 94 #endif |
88 | 95 |
89 /* make sure data dictionary is loaded */ | 96 /* make sure data dictionary is loaded */ |
90 if (!dcmDataDict.isDictionaryLoaded()) | 97 if (!dcmDataDict.isDictionaryLoaded()) |
91 { | 98 { |
92 LOG(ERROR) << "no data dictionary loaded, check environment variable: " << DCM_DICT_ENVIRONMENT_VARIABLE; | 99 LOG(ERROR) << "No DICOM dictionary loaded, check environment variable: " << DCM_DICT_ENVIRONMENT_VARIABLE; |
93 throw OrthancException(ErrorCode_InternalError); | 100 throw OrthancException(ErrorCode_InternalError); |
101 } | |
102 | |
103 { | |
104 // Test the dictionary with a simple DICOM tag | |
105 DcmTag key(0x0010, 0x1030); // This is PatientWeight | |
106 if (key.getEVR() != EVR_DS) | |
107 { | |
108 LOG(ERROR) << "The DICOM dictionary has not been correctly read"; | |
109 throw OrthancException(ErrorCode_InternalError); | |
110 } | |
94 } | 111 } |
95 | 112 |
96 /* initialize network, i.e. create an instance of T_ASC_Network*. */ | 113 /* initialize network, i.e. create an instance of T_ASC_Network*. */ |
97 T_ASC_Network *net; | 114 T_ASC_Network *net; |
98 OFCondition cond = ASC_initializeNetwork | 115 OFCondition cond = ASC_initializeNetwork |