changeset 1678:1393e3393a0b

fix mpr sample
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Nov 2020 07:40:19 +0100
parents 51bab5188a13
children 5b8b88e5bfd6
files Applications/Platforms/WebAssembly/WebAssemblyOracle.cpp Applications/Platforms/WebAssembly/WebAssemblyOracle.h
diffstat 2 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Applications/Platforms/WebAssembly/WebAssemblyOracle.cpp	Mon Nov 23 19:24:18 2020 +0100
+++ b/Applications/Platforms/WebAssembly/WebAssemblyOracle.cpp	Tue Nov 24 07:40:19 2020 +0100
@@ -838,31 +838,31 @@
 #endif
   }
 
+#if ORTHANC_ENABLE_DCMTK == 1
   const Orthanc::ParsedDicomFile& WebAssemblyOracle::CachedInstanceAccessor::GetDicom() const
   {
     if (IsValid())
     {
-#if ORTHANC_ENABLE_DCMTK == 1
       assert(reader_.get() != NULL);
       return reader_->GetDicom();
-#endif
     }
     else
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
     }
   }
+#endif
 
   size_t WebAssemblyOracle::CachedInstanceAccessor::GetFileSize() const
   {
+#if ORTHANC_ENABLE_DCMTK == 1
     if (IsValid())
     {
-#if ORTHANC_ENABLE_DCMTK == 1
       assert(reader_.get() != NULL);
       return reader_->GetFileSize();
-#endif
     }
     else
+#endif
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
     }
@@ -870,14 +870,14 @@
 
   bool WebAssemblyOracle::CachedInstanceAccessor::HasPixelData() const
   {
+#if ORTHANC_ENABLE_DCMTK == 1
     if (IsValid())
     {
-#if ORTHANC_ENABLE_DCMTK == 1
       assert(reader_.get() != NULL);
       return reader_->HasPixelData();
-#endif
     }
     else
+#endif
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
     }
--- a/Applications/Platforms/WebAssembly/WebAssemblyOracle.h	Mon Nov 23 19:24:18 2020 +0100
+++ b/Applications/Platforms/WebAssembly/WebAssemblyOracle.h	Tue Nov 24 07:40:19 2020 +0100
@@ -137,12 +137,13 @@
 
       bool IsValid() const;
 
+#if ORTHANC_ENABLE_DCMTK == 1
       const Orthanc::ParsedDicomFile& GetDicom() const;
+#endif
 
       size_t GetFileSize() const;
 
       bool HasPixelData() const;
-    };
-    
+    };    
   };
 }