diff Applications/Platforms/WebAssembly/WebAssemblyOracle.h @ 1675:6fa05252b085

don't load low-quality image if the parsed dicom file is cached by the oracle
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 23 Nov 2020 18:09:14 +0100
parents 4fb8fdf03314
children 1393e3393a0b
line wrap: on
line diff
--- a/Applications/Platforms/WebAssembly/WebAssemblyOracle.h	Mon Nov 23 17:05:24 2020 +0100
+++ b/Applications/Platforms/WebAssembly/WebAssemblyOracle.h	Mon Nov 23 18:09:14 2020 +0100
@@ -123,5 +123,26 @@
     }
 
     void SetDicomCacheSize(size_t size);
+
+    class CachedInstanceAccessor : public boost::noncopyable
+    {
+    private:
+#if ORTHANC_ENABLE_DCMTK == 1
+      std::unique_ptr<ParsedDicomCache::Reader>  reader_;
+#endif
+
+    public:
+      CachedInstanceAccessor(WebAssemblyOracle& oracle,
+                             const std::string& sopInstanceUid);
+
+      bool IsValid() const;
+
+      const Orthanc::ParsedDicomFile& GetDicom() const;
+
+      size_t GetFileSize() const;
+
+      bool HasPixelData() const;
+    };
+    
   };
 }