diff OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 1279:7f3a65e84d4b

More flexible /modify and /anonymize for single instance
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Feb 2015 16:14:29 +0100
parents 80671157d051
children 6e7e5ed91c2d
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp	Tue Jan 27 14:17:07 2015 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp	Mon Feb 02 16:14:29 2015 +0100
@@ -194,7 +194,7 @@
       {
         // Overwrite the random Patient's Name by one that is more
         // user-friendly (provided none was specified by the user)
-        target.Replace(DICOM_TAG_PATIENT_NAME, GeneratePatientName(OrthancRestApi::GetContext(call)));
+        target.Replace(DICOM_TAG_PATIENT_NAME, GeneratePatientName(OrthancRestApi::GetContext(call)), true);
       }
 
       return true;
@@ -361,6 +361,7 @@
   static void ModifyInstance(RestApiPostCall& call)
   {
     DicomModification modification;
+    modification.SetAllowManualIdentifiers(true);
 
     if (ParseModifyRequest(modification, call))
     {
@@ -389,6 +390,7 @@
   static void AnonymizeInstance(RestApiPostCall& call)
   {
     DicomModification modification;
+    modification.SetAllowManualIdentifiers(true);
 
     if (ParseAnonymizationRequest(modification, call))
     {