Mercurial > hg > orthanc-stl
comparison Sources/Plugin.cpp @ 69:c42bac260709
back to mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sun, 16 Jun 2024 21:13:49 +0200 |
parents | 054e36474998 |
children | a5c1be2ec26a |
comparison
equal
deleted
inserted
replaced
67:d34f662a3a6c | 69:c42bac260709 |
---|---|
73 * $ python -c 'import pydicom; print(pydicom.uid.generate_uid())' | 73 * $ python -c 'import pydicom; print(pydicom.uid.generate_uid())' |
74 * | 74 * |
75 **/ | 75 **/ |
76 static const char* const ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE = "1.2.826.0.1.3680043.8.498.90514926286349109728701975613711986292"; | 76 static const char* const ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE = "1.2.826.0.1.3680043.8.498.90514926286349109728701975613711986292"; |
77 static const char* const ORTHANC_STL_CREATOR_VERSION_UID_1_1 = "1.2.826.0.1.3680043.8.498.13468660186379895313063577332103681503"; | 77 static const char* const ORTHANC_STL_CREATOR_VERSION_UID_1_1 = "1.2.826.0.1.3680043.8.498.13468660186379895313063577332103681503"; |
78 static const char* const ORTHANC_STL_CREATOR_VERSION_UID_1_2 = "1.2.826.0.1.3680043.8.498.69380801008493335183088431949117714013"; | |
78 | 79 |
79 static const char* const GetCreatorVersionUid(const std::string& version) | 80 static const char* const GetCreatorVersionUid(const std::string& version) |
80 { | 81 { |
81 if (version == "mainline") | 82 if (version == "mainline") |
82 { | 83 { |
83 return ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE; | 84 return ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE; |
84 } | 85 } |
85 else if (version == "1.1") | 86 else if (version == "1.1") |
86 { | 87 { |
87 return ORTHANC_STL_CREATOR_VERSION_UID_1_1; | 88 return ORTHANC_STL_CREATOR_VERSION_UID_1_1; |
89 } | |
90 else if (version == "1.2") | |
91 { | |
92 return ORTHANC_STL_CREATOR_VERSION_UID_1_2; | |
88 } | 93 } |
89 else | 94 else |
90 { | 95 { |
91 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 96 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |
92 } | 97 } |
94 | 99 |
95 static void FillOrthancExplorerCreatorVersionUid(std::map<std::string, std::string>& dictionary) | 100 static void FillOrthancExplorerCreatorVersionUid(std::map<std::string, std::string>& dictionary) |
96 { | 101 { |
97 dictionary["ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE"] = ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE; | 102 dictionary["ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE"] = ORTHANC_STL_CREATOR_VERSION_UID_MAINLINE; |
98 dictionary["ORTHANC_STL_CREATOR_VERSION_UID_1_1"] = ORTHANC_STL_CREATOR_VERSION_UID_1_1; | 103 dictionary["ORTHANC_STL_CREATOR_VERSION_UID_1_1"] = ORTHANC_STL_CREATOR_VERSION_UID_1_1; |
104 dictionary["ORTHANC_STL_CREATOR_VERSION_UID_1_2"] = ORTHANC_STL_CREATOR_VERSION_UID_1_2; | |
99 } | 105 } |
100 | 106 |
101 #endif | 107 #endif |
102 | 108 |
103 | 109 |