Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 2194:3b40ca7470cc
"Keep" option for modifications to keep original DICOM identifiers (advanced feature)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 02 Dec 2016 16:58:35 +0100 |
parents | 5a8840920121 |
children | a3a65de1840f |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp Fri Dec 02 16:04:00 2016 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp Fri Dec 02 16:58:35 2016 +0100 @@ -136,6 +136,16 @@ ParseReplacements(target, request["Replace"]); } + // The "Keep" operation only makes sense for the tags + // StudyInstanceUID, SeriesInstanceUID and SOPInstanceUID. Avoid + // this feature as much as possible, as this breaks the DICOM + // model of the real world, except if you know exactly what + // you're doing! + if (request.isMember("Keep")) + { + ParseListOfTags(target, request["Keep"], TagOperation_Keep); + } + return true; } else