Mercurial > hg > orthanc
diff OrthancFramework/Sources/DicomParsing/DicomModification.cpp @ 4789:51ec061516c9
Fix handling of option "DeidentifyLogs", notably for tags (0010,0010) and (0010,0020)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 09 Sep 2021 13:02:33 +0200 |
parents | 979ae3ea3381 |
children | 7053502fbf97 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Mon Sep 06 22:13:07 2021 +0200 +++ b/OrthancFramework/Sources/DicomParsing/DicomModification.cpp Thu Sep 09 13:02:33 2021 +0200 @@ -1808,4 +1808,25 @@ } } } + + + bool DicomModification::IsAlteredTag(const DicomTag& tag) const + { + return (uids_.find(tag) != uids_.end() || + IsCleared(tag) || + IsRemoved(tag) || + IsReplaced(tag) || + (tag.IsPrivate() && + ArePrivateTagsRemoved() && + privateTagsToKeep_.find(tag) == privateTagsToKeep_.end()) || + (isAnonymization_ && ( + tag == DICOM_TAG_PATIENT_NAME || + tag == DICOM_TAG_PATIENT_ID)) || + (tag == DICOM_TAG_STUDY_INSTANCE_UID && + !keepStudyInstanceUid_) || + (tag == DICOM_TAG_SERIES_INSTANCE_UID && + !keepSeriesInstanceUid_) || + (tag == DICOM_TAG_SOP_INSTANCE_UID && + !keepSopInstanceUid_)); + } }