changeset 1860:c7d70f659190

DicomToJsonFormat_Simple -> DicomToJsonFormat_Human
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 02 Dec 2015 11:26:52 +0100
parents 4e7c318a3f69
children a7bea843a7bc
files OrthancServer/DicomProtocol/DicomFindAnswers.cpp OrthancServer/FromDcmtkBridge.cpp OrthancServer/OrthancRestApi/OrthancRestResources.cpp OrthancServer/ServerContext.cpp OrthancServer/ServerEnumerations.h OrthancServer/ServerToolbox.cpp Plugins/Engine/OrthancPlugins.cpp Plugins/Engine/PluginsEnumerations.cpp Plugins/Include/orthanc/OrthancCPlugin.h UnitTestsSources/FromDcmtkTests.cpp
diffstat 10 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/DicomProtocol/DicomFindAnswers.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/OrthancServer/DicomProtocol/DicomFindAnswers.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -189,7 +189,7 @@
                                 size_t index,
                                 bool simplify) const
   {
-    DicomToJsonFormat format = (simplify ? DicomToJsonFormat_Simple : DicomToJsonFormat_Full);
+    DicomToJsonFormat format = (simplify ? DicomToJsonFormat_Human : DicomToJsonFormat_Full);
     GetAnswer(index).ToJson(target, format, DicomToJsonFlags_None, 0);
   }
 
--- a/OrthancServer/FromDcmtkBridge.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/OrthancServer/FromDcmtkBridge.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -581,7 +581,7 @@
     
     switch (format)
     {
-      case DicomToJsonFormat_Simple:
+      case DicomToJsonFormat_Human:
         parent[tagName] = Json::nullValue;
         return parent[tagName];
 
@@ -628,7 +628,7 @@
     switch (format)
     {
       case DicomToJsonFormat_Short:
-      case DicomToJsonFormat_Simple:
+      case DicomToJsonFormat_Human:
       {
         assert(target.type() == Json::nullValue);
         targetValue = &target;
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -209,7 +209,7 @@
       context.ReadJson(full, publicId);
 
       Json::Value simplified;
-      Toolbox::SimplifyTags(simplified, full, DicomToJsonFormat_Simple);
+      Toolbox::SimplifyTags(simplified, full, DicomToJsonFormat_Human);
       call.GetOutput().AnswerJson(simplified);
     }
     else
@@ -928,7 +928,7 @@
       if (simplify)
       {
         Json::Value simplified;
-        Toolbox::SimplifyTags(simplified, sharedTags, DicomToJsonFormat_Simple);
+        Toolbox::SimplifyTags(simplified, sharedTags, DicomToJsonFormat_Human);
         call.GetOutput().AnswerJson(simplified);
       }
       else
@@ -995,7 +995,7 @@
     if (simplify)
     {
       Json::Value simplified;
-      Toolbox::SimplifyTags(simplified, result, DicomToJsonFormat_Simple);
+      Toolbox::SimplifyTags(simplified, result, DicomToJsonFormat_Human);
       call.GetOutput().AnswerJson(simplified);
     }
     else
@@ -1201,7 +1201,7 @@
       if (simplify)
       {
         Json::Value simplified;
-        Toolbox::SimplifyTags(simplified, full, DicomToJsonFormat_Simple);
+        Toolbox::SimplifyTags(simplified, full, DicomToJsonFormat_Human);
         result[*it] = simplified;
       }
       else
@@ -1295,7 +1295,7 @@
     if (simplify)
     {
       Json::Value simplified;
-      Toolbox::SimplifyTags(simplified, header, DicomToJsonFormat_Simple);
+      Toolbox::SimplifyTags(simplified, header, DicomToJsonFormat_Human);
       call.GetOutput().AnswerJson(simplified);
     }
     else
--- a/OrthancServer/ServerContext.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/OrthancServer/ServerContext.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -189,7 +189,7 @@
       resultPublicId = hasher.HashInstance();
 
       Json::Value simplifiedTags;
-      Toolbox::SimplifyTags(simplifiedTags, dicom.GetJson(), DicomToJsonFormat_Simple);
+      Toolbox::SimplifyTags(simplifiedTags, dicom.GetJson(), DicomToJsonFormat_Human);
 
       // Test if the instance must be filtered out
       bool accepted = true;
--- a/OrthancServer/ServerEnumerations.h	Wed Dec 02 11:22:05 2015 +0100
+++ b/OrthancServer/ServerEnumerations.h	Wed Dec 02 11:26:52 2015 +0100
@@ -109,7 +109,7 @@
   {
     DicomToJsonFormat_Full,
     DicomToJsonFormat_Short,
-    DicomToJsonFormat_Simple
+    DicomToJsonFormat_Human
   };
 
   enum DicomToJsonFlags
--- a/OrthancServer/ServerToolbox.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/OrthancServer/ServerToolbox.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -63,7 +63,7 @@
         std::string name;
         switch (format)
         {
-          case DicomToJsonFormat_Simple:
+          case DicomToJsonFormat_Human:
             name = v["Name"].asString();
             break;
 
--- a/Plugins/Engine/OrthancPlugins.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/Plugins/Engine/OrthancPlugins.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -1187,7 +1187,7 @@
         else
         {
           Json::Value simplified;
-          Toolbox::SimplifyTags(simplified, instance.GetJson(), DicomToJsonFormat_Simple);
+          Toolbox::SimplifyTags(simplified, instance.GetJson(), DicomToJsonFormat_Human);
           s = writer.write(simplified);
         }
 
--- a/Plugins/Engine/PluginsEnumerations.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/Plugins/Engine/PluginsEnumerations.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -226,8 +226,8 @@
         case OrthancPluginDicomToJsonFormat_Short:
           return DicomToJsonFormat_Short;
 
-        case OrthancPluginDicomToJsonFormat_Simple:
-          return DicomToJsonFormat_Simple;
+        case OrthancPluginDicomToJsonFormat_Human:
+          return DicomToJsonFormat_Human;
 
         default:
           throw OrthancException(ErrorCode_ParameterOutOfRange);
--- a/Plugins/Include/orthanc/OrthancCPlugin.h	Wed Dec 02 11:22:05 2015 +0100
+++ b/Plugins/Include/orthanc/OrthancCPlugin.h	Wed Dec 02 11:26:52 2015 +0100
@@ -682,7 +682,7 @@
   {
     OrthancPluginDicomToJsonFormat_Full = 1,    /*!< Full output, with most details */
     OrthancPluginDicomToJsonFormat_Short = 2,   /*!< Tags output as hexadecimal numbers */
-    OrthancPluginDicomToJsonFormat_Simple = 3,  /*!< Human-readable JSON */
+    OrthancPluginDicomToJsonFormat_Human = 3,   /*!< Human-readable JSON */
 
     _OrthancPluginDicomToJsonFormat_INTERNAL = 0x7fffffff
   } OrthancPluginDicomToJsonFormat;
--- a/UnitTestsSources/FromDcmtkTests.cpp	Wed Dec 02 11:22:05 2015 +0100
+++ b/UnitTestsSources/FromDcmtkTests.cpp	Wed Dec 02 11:26:52 2015 +0100
@@ -395,7 +395,7 @@
       FromDcmtkBridge::ToJson(b, *element, DicomToJsonFormat_Full, DicomToJsonFlags_Default, 0, Encoding_Ascii);
 
       Json::Value c;
-      Toolbox::SimplifyTags(c, b, DicomToJsonFormat_Simple);
+      Toolbox::SimplifyTags(c, b, DicomToJsonFormat_Human);
 
       a[1]["PatientName"] = "Hello2";  // To remove the Data URI Scheme encoding
       ASSERT_EQ(0, c["ReferencedStudySequence"].compare(a));
@@ -474,7 +474,7 @@
     f.ToJson(b, DicomToJsonFormat_Full, DicomToJsonFlags_Default, 0);
 
     Json::Value c;
-    Toolbox::SimplifyTags(c, b, DicomToJsonFormat_Simple);
+    Toolbox::SimplifyTags(c, b, DicomToJsonFormat_Human);
 
     ASSERT_EQ(0, c["ReferencedPatientSequence"].compare(a));
     ASSERT_NE(0, c["ReferencedStudySequence"].compare(a));  // Because Data URI Scheme decoding was enabled
@@ -516,7 +516,7 @@
       f.Replace(DICOM_TAG_PATIENT_NAME, s, false);
 
       Json::Value v;
-      f.ToJson(v, DicomToJsonFormat_Simple, DicomToJsonFlags_Default, 0);
+      f.ToJson(v, DicomToJsonFormat_Human, DicomToJsonFlags_Default, 0);
       ASSERT_EQ(v["PatientName"].asString(), std::string(testEncodingsExpected[i]));
     }
   }
@@ -709,7 +709,7 @@
       (ParsedDicomFile::CreateFromJson(v, static_cast<DicomFromJsonFlags>(DicomFromJsonFlags_GenerateIdentifiers)));
 
     Json::Value vv;
-    dicom->ToJson(vv, DicomToJsonFormat_Simple, toJsonFlags, 0);
+    dicom->ToJson(vv, DicomToJsonFormat_Human, toJsonFlags, 0);
 
     ASSERT_EQ(vv["SOPClassUID"].asString(), sopClassUid);
     ASSERT_EQ(vv["MediaStorageSOPClassUID"].asString(), sopClassUid);
@@ -725,7 +725,7 @@
       (ParsedDicomFile::CreateFromJson(v, static_cast<DicomFromJsonFlags>(DicomFromJsonFlags_GenerateIdentifiers)));
 
     Json::Value vv;
-    dicom->ToJson(vv, DicomToJsonFormat_Simple, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludePixelData), 0);
+    dicom->ToJson(vv, DicomToJsonFormat_Human, static_cast<DicomToJsonFlags>(DicomToJsonFlags_IncludePixelData), 0);
 
     std::string mime, content;
     Toolbox::DecodeDataUriScheme(mime, content, vv["PixelData"].asString());