diff OrthancStone/Sources/StoneEnumerations.cpp @ 1665:f62f685e0eb2

avoid loading instance metadata on RTSTRUCT to avoid JSON parsing that freezes the browser
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Nov 2020 15:39:30 +0100
parents 8563ea5d8ae4
children 9ac2a65d4172
line wrap: on
line diff
--- a/OrthancStone/Sources/StoneEnumerations.cpp	Thu Nov 19 12:15:21 2020 +0100
+++ b/OrthancStone/Sources/StoneEnumerations.cpp	Thu Nov 19 15:39:30 2020 +0100
@@ -36,6 +36,30 @@
     {
       return SopClassUid_RTDose;
     }
+    else if (s == "1.2.840.10008.5.1.4.1.1.481.5")
+    {
+      return SopClassUid_RTPlan;
+    }
+    else if (s == "1.2.840.10008.5.1.4.1.1.481.3")
+    {
+      return SopClassUid_RTStruct;
+    }
+    else if (s == "1.2.840.10008.5.1.4.1.1.104.1")
+    {
+      return SopClassUid_EncapsulatedPdf;
+    }
+    else if (s == "1.2.840.10008.5.1.4.1.1.77.1.1.1")
+    {
+      return SopClassUid_VideoEndoscopicImageStorage;
+    }      
+    else if (s == "1.2.840.10008.5.1.4.1.1.77.1.2.1")
+    {
+      return SopClassUid_VideoMicroscopicImageStorage;
+    }      
+    else if (s == "1.2.840.10008.5.1.4.1.1.77.1.4.1")
+    {
+      return SopClassUid_VideoPhotographicImageStorage;
+    }      
     else
     {
       //LOG(INFO) << "Other SOP class UID: " << source;
@@ -175,4 +199,22 @@
       }
     }
   }
+
+
+  SeriesThumbnailType GetSeriesThumbnailType(SopClassUid sopClassUid)
+  {
+    switch (sopClassUid)
+    {
+      case SopClassUid_EncapsulatedPdf:
+        return SeriesThumbnailType_Pdf;
+        
+      case SopClassUid_VideoEndoscopicImageStorage:
+      case SopClassUid_VideoMicroscopicImageStorage:
+      case SopClassUid_VideoPhotographicImageStorage:
+        return SeriesThumbnailType_Video;
+
+      default:
+        return SeriesThumbnailType_Unsupported;
+    }
+  }
 }