Mercurial > hg > orthanc
comparison OrthancServer/DicomProtocol/DicomServer.cpp @ 494:012b63028085
CMake parameter for the location of DCMTK dictionaries
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 Jul 2013 13:45:28 +0200 |
parents | 16b52fb8d034 |
children | 08eca5d86aad |
comparison
equal
deleted
inserted
replaced
493:ff34c51cd3dd | 494:012b63028085 |
---|---|
80 const std::string& filename) | 80 const std::string& filename) |
81 { | 81 { |
82 boost::filesystem::path p = directory; | 82 boost::filesystem::path p = directory; |
83 p = p / filename; | 83 p = p / filename; |
84 | 84 |
85 LOG(WARNING) << "Loading the external DICOM dictionary " << p; | |
86 | |
85 if (!dictionary.loadDictionary(p.string().c_str())) | 87 if (!dictionary.loadDictionary(p.string().c_str())) |
86 { | 88 { |
87 throw OrthancException(ErrorCode_InternalError); | 89 throw OrthancException(ErrorCode_InternalError); |
88 } | 90 } |
89 } | 91 } |
109 | 111 |
110 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_DICOM); | 112 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_DICOM); |
111 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_PRIVATE); | 113 LoadEmbeddedDictionary(d, EmbeddedResources::DICTIONARY_PRIVATE); |
112 | 114 |
113 #elif defined(__linux) | 115 #elif defined(__linux) |
114 std::string path = "/usr/share/dcmtk"; | 116 std::string path = DCMTK_DICTIONARY_DIR; |
115 | 117 |
116 const char* env = std::getenv(DCM_DICT_ENVIRONMENT_VARIABLE); | 118 const char* env = std::getenv(DCM_DICT_ENVIRONMENT_VARIABLE); |
117 if (env != NULL) | 119 if (env != NULL) |
118 { | 120 { |
119 path = std::string(env); | 121 path = std::string(env); |