# HG changeset patch # User Alain Mazy # Date 1675275898 -3600 # Node ID dce028ec0fe933578f3038b4a8f95160ae4e7a91 # Parent a72e00a23191440604719ef2967f7d44b005cbbc# Parent 217863b0945722cc3b2735dc24d4402939cee792 merge diff -r 217863b09457 -r dce028ec0fe9 OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp --- a/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Wed Feb 01 19:23:58 2023 +0100 +++ b/OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp Wed Feb 01 19:24:58 2023 +0100 @@ -1253,9 +1253,22 @@ } + static bool GetTagFromNameInternal(DicomTag& tag, const std::string& tagName) + { + // conversion from old tag names (ex: RETIRED_OtherPatientIDs is the new name for OtherPatientIDs that is still a valid name for DICOM_TAG_OTHER_PATIENT_IDS) + if (tagName == "OtherPatientIDs") + { + tag = DICOM_TAG_OTHER_PATIENT_IDS; + return true; + } + + return false; + } + std::string FromDcmtkBridge::GetTagName(const DicomTag& t, const std::string& privateCreator) { + DcmTag tag(t.GetGroup(), t.GetElement()); if (!privateCreator.empty()) @@ -1315,6 +1328,12 @@ } else { + DicomTag dcmTag(0, 0); + if (GetTagFromNameInternal(dcmTag, name)) + { + return dcmTag; + } + CLOG(INFO, DICOM) << "Unknown DICOM tag: \"" << name << "\""; throw OrthancException(ErrorCode_UnknownDicomTag, name, false); } diff -r 217863b09457 -r dce028ec0fe9 OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.cpp --- a/OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.cpp Wed Feb 01 19:23:58 2023 +0100 +++ b/OrthancServer/Sources/ServerJobs/ThreadedSetOfInstancesJob.cpp Wed Feb 01 19:24:58 2023 +0100 @@ -156,6 +156,9 @@ // wait until all instances are processed by the workers if (instancesToProcessQueue_.GetSize() != 0) { + // "slow down" the job main thread, to avoid using 100% of a core simply to check that other threads are done + boost::this_thread::sleep(boost::posix_time::milliseconds(5)); + return JobStepResult::Continue(); } else