diff OrthancServer/OrthancRestApi.cpp @ 214:03817919169b

list of frames
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 29 Nov 2012 11:11:53 +0100
parents 4ce7fdcc8879
children c07170f3f4f7
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi.cpp	Thu Nov 29 10:59:40 2012 +0100
+++ b/OrthancServer/OrthancRestApi.cpp	Thu Nov 29 11:11:53 2012 +0100
@@ -375,76 +375,6 @@
 
     // Get the DICOM or the JSON file of one instance ---------------------------
  
-    else if (uri.size() == 3 &&
-             uri[0] == "instances" &&
-             (uri[2] == "file" || 
-              uri[2] == "tags" || 
-              uri[2] == "simplified-tags"))
-    {
-      CompressionType compressionType;
-      std::string fileUuid, contentType, filename;
-      if (uri[2] == "file")
-      {
-        existingResource = index_.GetFile(fileUuid, compressionType, uri[1], AttachedFileType_Dicom);
-        contentType = "application/dicom";
-        filename = fileUuid + ".dcm";
-      }
-      else if (uri[2] == "tags" ||
-               uri[2] == "simplified-tags")
-      {
-        existingResource = index_.GetFile(fileUuid, compressionType, uri[1], AttachedFileType_Json);
-        contentType = "application/json";
-        filename = fileUuid + ".json";
-      }
-
-      if (existingResource)
-      {
-        if (uri[2] == "simplified-tags")
-        {
-          Json::Value simplified, full;
-          ReadJson(full, storage_, fileUuid);
-          SimplifyTags(simplified, full);
-          SendJson(output, simplified);
-          return;
-        }
-        else
-        {
-          output.AnswerFile(storage_, fileUuid, contentType, filename.c_str());
-          return;
-        }
-      }
-    }
-
-
-    else if (uri.size() == 3 &&
-             uri[0] == "instances" &&
-             uri[2] == "frames")
-    {
-      Json::Value instance(Json::objectValue);
-      existingResource = index_.LookupResource(instance, uri[1], ResourceType_Instance);
-
-      if (existingResource)
-      {
-        result = Json::arrayValue;
-
-        unsigned int numberOfFrames = 1;
-        try
-        {
-          Json::Value tmp = instance["MainDicomTags"]["NumberOfFrames"];
-          numberOfFrames = boost::lexical_cast<unsigned int>(tmp.asString());
-        }
-        catch (boost::bad_lexical_cast)
-        {
-        }
-
-        for (unsigned int i = 0; i < numberOfFrames; i++)
-        {
-          result.append(i);
-        }                
-      }
-    }
-
-
     else if (uri[0] == "instances" &&
              ((uri.size() == 3 &&
                (uri[2] == "preview" ||