changeset 2446:a894adc8bb03

/tools/create-media-extended to include type-3 tags in DICOMDIR
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 14 Dec 2017 16:30:30 +0100
parents 6e5bc5c6d1a4
children 878b59270859
files NEWS OrthancServer/OrthancRestApi/OrthancRestArchive.cpp
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Dec 14 13:02:06 2017 +0100
+++ b/NEWS	Thu Dec 14 16:30:30 2017 +0100
@@ -5,7 +5,9 @@
 --------
 
 * "/system" URI returns the version of the Orthanc REST API
-* added ?expand argument to /peers and /modalities routes
+* Added "?expand" GET argument to "/peers" and "/modalities" routes
+* New URI: "/tools/create-media-extended" to generate a DICOMDIR
+  archive from several resources, including additional type-3 tags
 
 Maintenance
 -----------
--- a/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp	Thu Dec 14 13:02:06 2017 +0100
+++ b/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp	Thu Dec 14 16:30:30 2017 +0100
@@ -716,7 +716,8 @@
     }
   }  
 
-
+  
+  template <bool Extended>
   static void CreateBatchMedia(RestApiPostCall& call)
   {
     ArchiveIndex archive(ResourceType_Patient);  // root
@@ -727,7 +728,7 @@
                                 OrthancRestApi::GetContext(call),
                                 archive,
                                 "Archive.zip",
-                                false);
+                                Extended);
     }
   }  
 
@@ -778,6 +779,7 @@
     Register("/series/{id}/media", CreateMedia);
 
     Register("/tools/create-archive", CreateBatchArchive);
-    Register("/tools/create-media", CreateBatchMedia);
+    Register("/tools/create-media", CreateBatchMedia<false>);
+    Register("/tools/create-media-extended", CreateBatchMedia<true>);
   }
 }