diff OrthancFramework/Sources/DicomParsing/DicomModification.cpp @ 4273:0034f855c023

tuning log categories from command-line, and binary compat with orthanc framework 1.7.2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 03 Nov 2020 12:24:50 +0100
parents 0ae2ca210077
children 785a2713323e
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomParsing/DicomModification.cpp	Tue Nov 03 07:19:33 2020 +0100
+++ b/OrthancFramework/Sources/DicomParsing/DicomModification.cpp	Tue Nov 03 12:24:50 2020 +0100
@@ -328,7 +328,7 @@
     }
 
     std::string original;
-    if (!dicom.GetTagValue(original, *tag))
+    if (!const_cast<const ParsedDicomFile&>(dicom).GetTagValue(original, *tag))
     {
       original = "";
     }
@@ -1017,7 +1017,7 @@
       {
         std::string original;
         std::string replacement = GetReplacementAsString(DICOM_TAG_STUDY_INSTANCE_UID);
-        toModify.GetTagValue(original, DICOM_TAG_STUDY_INSTANCE_UID);
+        const_cast<const ParsedDicomFile&>(toModify).GetTagValue(original, DICOM_TAG_STUDY_INSTANCE_UID);
         RegisterMappedDicomIdentifier(original, replacement, ResourceType_Study);
       }
 
@@ -1025,7 +1025,7 @@
       {
         std::string original;
         std::string replacement = GetReplacementAsString(DICOM_TAG_SERIES_INSTANCE_UID);
-        toModify.GetTagValue(original, DICOM_TAG_SERIES_INSTANCE_UID);
+        const_cast<const ParsedDicomFile&>(toModify).GetTagValue(original, DICOM_TAG_SERIES_INSTANCE_UID);
         RegisterMappedDicomIdentifier(original, replacement, ResourceType_Series);
       }
 
@@ -1033,7 +1033,7 @@
       {
         std::string original;
         std::string replacement = GetReplacementAsString(DICOM_TAG_SOP_INSTANCE_UID);
-        toModify.GetTagValue(original, DICOM_TAG_SOP_INSTANCE_UID);
+        const_cast<const ParsedDicomFile&>(toModify).GetTagValue(original, DICOM_TAG_SOP_INSTANCE_UID);
         RegisterMappedDicomIdentifier(original, replacement, ResourceType_Instance);
       }
     }
@@ -1114,7 +1114,7 @@
 
       if (updateReferencedRelationships_)
       {
-        toModify.Apply(visitor);
+        const_cast<const ParsedDicomFile&>(toModify).Apply(visitor);
       }
       else
       {