comparison OrthancFramework/Sources/DicomParsing/DicomModification.cpp @ 4696:dd6274412ff4

new configuration option "ExternalDictionaries" to load external DICOM dictionaries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Jun 2021 15:47:21 +0200
parents 45bce660ce3a
children b51c08bd5c38
comparison
equal deleted inserted replaced
4695:651f069c7f77 4696:dd6274412ff4
802 for (SetOfTags::const_iterator it = uids_.begin(); it != uids_.end(); ++it) 802 for (SetOfTags::const_iterator it = uids_.begin(); it != uids_.end(); ++it)
803 { 803 {
804 ValueRepresentation vr = FromDcmtkBridge::LookupValueRepresentation(*it); 804 ValueRepresentation vr = FromDcmtkBridge::LookupValueRepresentation(*it);
805 if (*it == DICOM_TAG_PATIENT_ID) 805 if (*it == DICOM_TAG_PATIENT_ID)
806 { 806 {
807 if (vr != ValueRepresentation_LongString) 807 if (vr != ValueRepresentation_LongString &&
808 vr != ValueRepresentation_NotSupported /* if no dictionary loaded */)
808 { 809 {
809 throw OrthancException(ErrorCode_InternalError); 810 throw OrthancException(ErrorCode_InternalError);
810 } 811 }
811 } 812 }
812 else if (*it == DICOM_TAG_PATIENT_NAME) 813 else if (*it == DICOM_TAG_PATIENT_NAME)
813 { 814 {
814 if (vr != ValueRepresentation_PersonName) 815 if (vr != ValueRepresentation_PersonName &&
816 vr != ValueRepresentation_NotSupported /* if no dictionary loaded */)
815 { 817 {
816 throw OrthancException(ErrorCode_InternalError); 818 throw OrthancException(ErrorCode_InternalError);
817 } 819 }
818 } 820 }
819 else if (vr != ValueRepresentation_UniqueIdentifier && 821 else if (vr != ValueRepresentation_UniqueIdentifier &&