diff OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 782:a60040857ce6

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 May 2014 12:59:05 +0200
parents 5197fd35333c
children d466b3606aca
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Fri May 02 11:05:26 2014 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Fri May 02 12:59:05 2014 +0200
@@ -541,6 +541,17 @@
   }
 
 
+  // Raw access to the DICOM tags of an instance ------------------------------
+
+  static void GetRawContent(RestApi::GetCall& call)
+  {
+    std::string id = call.GetUriComponent("id", "");
+
+    ServerContext::DicomCacheLocker locker(OrthancRestApi::GetContext(call), id);
+
+    locker.GetDicom().SendPathValue(call.GetOutput(), call.GetTrailingUri());
+  }
+
 
 
   void OrthancRestApi::RegisterResources()
@@ -598,5 +609,7 @@
     Register("/{resourceType}/{id}/attachments/{name}/size", GetAttachmentSize);
     Register("/{resourceType}/{id}/attachments/{name}/verify-md5", VerifyAttachment);
     Register("/{resourceType}/{id}/attachments/{name}", UploadAttachment);
+
+    Register("/instances/{id}/content/*", GetRawContent);
   }
 }