diff OrthancServer/Sources/ServerToolbox.cpp @ 4140:0ddc5297a8ab

centralization of default parameters for JSON/DicomMap conversions from DCMTK
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Aug 2020 10:46:50 +0200
parents a4f28efdfccf
children d9473bd5ed43
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerToolbox.cpp	Thu Aug 06 18:25:47 2020 +0200
+++ b/OrthancServer/Sources/ServerToolbox.cpp	Fri Aug 07 10:46:50 2020 +0200
@@ -41,6 +41,7 @@
 #include "../../OrthancFramework/Sources/OrthancException.h"
 #include "Database/IDatabaseWrapper.h"
 #include "Database/ResourcesContent.h"
+#include "OrthancConfiguration.h"
 #include "ServerContext.h"
 
 #include <cassert>
@@ -269,7 +270,7 @@
 
           // Update the tags of this resource
           DicomMap dicomSummary;
-          dicom.ExtractDicomSummary(dicomSummary, ORTHANC_MAXIMUM_TAG_LENGTH);
+          OrthancConfiguration::DefaultExtractDicomSummary(dicomSummary, dicom);
 
           database.ClearMainDicomTags(resource);
 
@@ -379,7 +380,7 @@
         ServerContext::DicomCacheLocker locker(context, *it);
 
         Json::Value dicomAsJson;
-        locker.GetDicom().DatasetToJson(dicomAsJson);
+        OrthancConfiguration::DefaultDicomDatasetToJson(dicomAsJson, locker.GetDicom());
 
         std::string s = dicomAsJson.toStyledString();
         context.AddAttachment(*it, FileContentType_DicomAsJson, s.c_str(), s.size());