Mercurial > hg > orthanc
comparison Plugins/Samples/GdcmDecoder/GdcmDecoderCache.h @ 3915:7e33516965f8 transcoding
merging sample GDCM decoder and Orthanc Web viewer
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 11 May 2020 15:13:16 +0200 |
parents | 6110a4995ace |
children |
comparison
equal
deleted
inserted
replaced
3914:e14b5a7a0f75 | 3915:7e33516965f8 |
---|---|
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "../../../Core/Compatibility.h" | 24 #include "../../../Core/Compatibility.h" |
25 #include "GdcmImageDecoder.h" | 25 #include "GdcmImageDecoder.h" |
26 #include "OrthancImageWrapper.h" | 26 #include "../Common/OrthancPluginCppWrapper.h" |
27 | 27 |
28 #include <boost/thread.hpp> | 28 #include <boost/thread.hpp> |
29 | 29 |
30 | 30 |
31 namespace OrthancPlugins | 31 namespace OrthancPlugins |
36 boost::mutex mutex_; | 36 boost::mutex mutex_; |
37 std::unique_ptr<OrthancPlugins::GdcmImageDecoder> decoder_; | 37 std::unique_ptr<OrthancPlugins::GdcmImageDecoder> decoder_; |
38 size_t size_; | 38 size_t size_; |
39 std::string md5_; | 39 std::string md5_; |
40 | 40 |
41 static std::string ComputeMd5(OrthancPluginContext* context, | 41 static std::string ComputeMd5(const void* dicom, |
42 const void* dicom, | |
43 size_t size); | 42 size_t size); |
44 | 43 |
45 public: | 44 public: |
46 GdcmDecoderCache() : size_(0) | 45 GdcmDecoderCache() : size_(0) |
47 { | 46 { |
48 } | 47 } |
49 | 48 |
50 OrthancImageWrapper* Decode(OrthancPluginContext* context, | 49 OrthancImage* Decode(const void* dicom, |
51 const void* dicom, | 50 const uint32_t size, |
52 const uint32_t size, | 51 uint32_t frameIndex); |
53 uint32_t frameIndex); | |
54 }; | 52 }; |
55 } | 53 } |