Mercurial > hg > orthanc-stone
comparison Applications/Platforms/WebAssembly/WebAssemblyOracle.cpp @ 1678:1393e3393a0b
fix mpr sample
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 24 Nov 2020 07:40:19 +0100 |
parents | 6fa05252b085 |
children | 81273beabc9f |
comparison
equal
deleted
inserted
replaced
1677:51bab5188a13 | 1678:1393e3393a0b |
---|---|
836 #else | 836 #else |
837 return false; | 837 return false; |
838 #endif | 838 #endif |
839 } | 839 } |
840 | 840 |
841 #if ORTHANC_ENABLE_DCMTK == 1 | |
841 const Orthanc::ParsedDicomFile& WebAssemblyOracle::CachedInstanceAccessor::GetDicom() const | 842 const Orthanc::ParsedDicomFile& WebAssemblyOracle::CachedInstanceAccessor::GetDicom() const |
842 { | 843 { |
843 if (IsValid()) | 844 if (IsValid()) |
844 { | 845 { |
845 #if ORTHANC_ENABLE_DCMTK == 1 | |
846 assert(reader_.get() != NULL); | 846 assert(reader_.get() != NULL); |
847 return reader_->GetDicom(); | 847 return reader_->GetDicom(); |
848 #endif | |
849 } | 848 } |
850 else | 849 else |
851 { | 850 { |
852 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 851 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
853 } | 852 } |
854 } | 853 } |
854 #endif | |
855 | 855 |
856 size_t WebAssemblyOracle::CachedInstanceAccessor::GetFileSize() const | 856 size_t WebAssemblyOracle::CachedInstanceAccessor::GetFileSize() const |
857 { | 857 { |
858 #if ORTHANC_ENABLE_DCMTK == 1 | |
858 if (IsValid()) | 859 if (IsValid()) |
859 { | 860 { |
860 #if ORTHANC_ENABLE_DCMTK == 1 | |
861 assert(reader_.get() != NULL); | 861 assert(reader_.get() != NULL); |
862 return reader_->GetFileSize(); | 862 return reader_->GetFileSize(); |
863 #endif | |
864 } | 863 } |
865 else | 864 else |
865 #endif | |
866 { | 866 { |
867 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 867 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
868 } | 868 } |
869 } | 869 } |
870 | 870 |
871 bool WebAssemblyOracle::CachedInstanceAccessor::HasPixelData() const | 871 bool WebAssemblyOracle::CachedInstanceAccessor::HasPixelData() const |
872 { | 872 { |
873 #if ORTHANC_ENABLE_DCMTK == 1 | |
873 if (IsValid()) | 874 if (IsValid()) |
874 { | 875 { |
875 #if ORTHANC_ENABLE_DCMTK == 1 | |
876 assert(reader_.get() != NULL); | 876 assert(reader_.get() != NULL); |
877 return reader_->HasPixelData(); | 877 return reader_->HasPixelData(); |
878 #endif | |
879 } | 878 } |
880 else | 879 else |
880 #endif | |
881 { | 881 { |
882 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); | 882 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); |
883 } | 883 } |
884 } | 884 } |
885 } | 885 } |