Mercurial > hg > orthanc
changeset 5154:dce028ec0fe9
merge
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 01 Feb 2023 19:24:58 +0100 |
parents | a72e00a23191 (diff) 217863b09457 (current diff) |
children | 20911302c6e7 |
files | |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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); }
--- 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