# HG changeset patch # User Sebastien Jodogne # Date 1606200019 -3600 # Node ID 1393e3393a0b2fa911b68a34959da62fc0e76394 # Parent 51bab5188a13e50dd3855bb6f3f85599c884e7c8 fix mpr sample diff -r 51bab5188a13 -r 1393e3393a0b Applications/Platforms/WebAssembly/WebAssemblyOracle.cpp --- 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); } diff -r 51bab5188a13 -r 1393e3393a0b Applications/Platforms/WebAssembly/WebAssemblyOracle.h --- 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; - }; - + }; }; }