diff OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 1702:9980875edc7c db-changes

started work on SliceOrdering
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 12 Oct 2015 17:49:23 +0200
parents 4aaaecae5803
children b80e76dd1d56
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Mon Oct 12 14:47:58 2015 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp	Mon Oct 12 17:49:23 2015 +0200
@@ -39,6 +39,7 @@
 #include "../ResourceFinder.h"
 #include "../DicomFindQuery.h"
 #include "../ServerContext.h"
+#include "../SliceOrdering.h"
 
 
 namespace Orthanc
@@ -1093,6 +1094,16 @@
   }
 
 
+  static void OrderSlices(RestApiGetCall& call)
+  {
+    const std::string id = call.GetUriComponent("id", "");
+
+    ServerIndex& index = OrthancRestApi::GetIndex(call);
+    SliceOrdering ordering(index, id);
+
+  }
+
+
   void OrthancRestApi::RegisterResources()
   {
     Register("/instances", ListResources<ResourceType_Instance>);
@@ -1187,5 +1198,7 @@
     Register("/series/{id}/instances-tags", GetChildInstancesTags);
 
     Register("/instances/{id}/content/*", GetRawContent);
+
+    Register("/series/{id}/ordered-slices", OrderSlices);
   }
 }