diff OrthancServer/FromDcmtkBridge.cpp @ 789:55dae8c5a6ab

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 05 May 2014 18:43:34 +0200
parents 7ebe4bf87196
children 331eaf9d9d69
line wrap: on
line diff
--- a/OrthancServer/FromDcmtkBridge.cpp	Mon May 05 18:39:36 2014 +0200
+++ b/OrthancServer/FromDcmtkBridge.cpp	Mon May 05 18:43:34 2014 +0200
@@ -784,7 +784,7 @@
 
   void ParsedDicomFile::Replace(const DicomTag& tag,
                                 const std::string& value,
-                                FromDcmtkBridge::ReplaceMode mode)
+                                DicomReplaceMode mode)
   {
     DcmTagKey key(tag.GetGroup(), tag.GetElement());
     DcmElement* element = NULL;
@@ -795,14 +795,14 @@
       // This field does not exist, act wrt. the specified "mode"
       switch (mode)
       {
-        case FromDcmtkBridge::ReplaceMode_InsertIfAbsent:
+        case DicomReplaceMode_InsertIfAbsent:
           Insert(tag, value);
           break;
 
-        case FromDcmtkBridge::ReplaceMode_ThrowIfAbsent:
+        case DicomReplaceMode_ThrowIfAbsent:
           throw OrthancException(ErrorCode_InexistentItem);
 
-        case FromDcmtkBridge::ReplaceMode_IgnoreIfAbsent:
+        case DicomReplaceMode_IgnoreIfAbsent:
           return;
       }
     }
@@ -823,14 +823,12 @@
 
     if (tag == DICOM_TAG_SOP_CLASS_UID)
     {
-      Replace(DICOM_TAG_MEDIA_STORAGE_SOP_CLASS_UID, value,
-              FromDcmtkBridge::ReplaceMode_InsertIfAbsent);
+      Replace(DICOM_TAG_MEDIA_STORAGE_SOP_CLASS_UID, value, DicomReplaceMode_InsertIfAbsent);
     }
 
     if (tag == DICOM_TAG_SOP_INSTANCE_UID)
     {
-      Replace(DICOM_TAG_MEDIA_STORAGE_SOP_INSTANCE_UID, value, 
-              FromDcmtkBridge::ReplaceMode_InsertIfAbsent);
+      Replace(DICOM_TAG_MEDIA_STORAGE_SOP_INSTANCE_UID, value, DicomReplaceMode_InsertIfAbsent);
     }
   }